Partition I can't get to owned by root.

When I set up the install(42.3) I set up four partitions. ‘/’, swap, a 50GB(/home), and a 51GB(which I thought was an extended partition, but it isn’t, MY BAD).
I don’t know if root ‘owned’ the 51GB partition prior to the upgrade to leap 15, but he does now.
Right now it is 51GB of space I can’t begin to utilize, and I would like it as mine for future use.

Is there anyway I can get ownership of that 51GB partition changed to my user account?

Yes. As root, in a console, change the owner from root to your user.
First, cd to the top directory of that partition, then

chown -R *yourusername*:users .

The -R is for recursive so it will change all files and directories from there on down in the partition to your user & group.
The :users is to change the group ownership to users from root.
The . means starting at the current directory.

When done, to learn more about this command (as it is usefull to know), do:

chown --help

You will find it very handy information for the future.

On Wed 20 Jun 2018 01:06:03 AM CDT, Bill L wrote:

When I set up the install(42.3) I set up four partitions. ‘/’, swap, a
50GB(/home), and a 51GB(which I thought was an extended partition, but
it isn’t, MY BAD).
I don’t know if root ‘owned’ the 51GB partition prior to the upgrade to
leap 15, but he does now.
Right now it is 51GB of space I can’t begin to utilize, and I would like
it as mine for future use.

Is there anyway I can get ownership of that 51GB partition changed to my
user account?

Hi
Is this partition mounted as something?

If not, fire up YaST Partitioner and then select the drive, eg sda and
you should see the partitions in the right hand side, highlight your
partition and select ‘edit’. Here you can format, suggest xfs and the
set the mount point eg I use /data and then in the fstab options give
it a name eg data (This is what I use) and finish.

So now you should see something like;


lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 223.6G  0 disk
├─sda1   8:1    0   260M  0 part /boot/efi
├─sda2   8:2    0    40G  0 part /
├─sda3   8:3    0 175.3G  0 part /data
└─sda4   8:4    0     8G  0 part [SWAP]

What I do is then as root user create folders and change ownership to
my user from the command line, eg;


su -
cd /data
mkdir Downloads
chown <username>:users Downloads

During an upgrade/re-install I then do the same naming setup via the
expert partitioner, BUT don’t format, just set the mount point /data
and name data.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-23-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

I had looked at the help for chown and attempted something but it just error-ed out. Probably a good thing!
OK> sorry to be so dense, but the only directory in that partition is a ‘lost+found’ and I don’t know how to cd to that directory. It doesn’t show up after I cd all the way up in a root terminal.
OOPS, there is a lost+fund in root, but I am not sure if it is that directory I need to cd to.

OK, Thanks, between Fraser_Bell and malcolmlewis, I have ownership of that partition.
Now on to reading and understanding the --help for chown among the many there are to ‘learn’.

Just a note on “lost+found”.

This is actually fairly standard in the unix/linux world, though it might depend on the type of filesystem.

The “lost+found” directory is owned by root, readable only by root. And it is usually empty.

The purpose is this: at various time, the “fsck” command is run on the disk – usually just before mounting. If it finds some errors, it attempts to correct those errors. If it finds a lost file or lost directory, then it creates a directory entry in “lost+found”.

I think the last time that I saw a file in “lost+found” was around 15 years ago with Solaris unix. So it is quite rare for something to show up there.

As an extra to the OP>

It seems that you are a bit confused about terminology. E.g. a partitions is not owned by root. But the mount point (a directory) of a file system and the root directory on a file system are owned by some user.

More information on: https://en.opensuse.org/SDB%3ABasics_of_partitions,_filesystems,_mount_points

On 2018-06-20, hcvv <hcvv@no-mx.forums.microfocus.com> wrote:
> As an extra to the OP>

And another extra to the OP (since I believe the OP is using a dual-boot system), chmod and chown don’t work on NTFS
partitions, since the NTFS file system does not support POSIX-style permissions. In such cases, the read/write
permissions, are controlled by the relevant /etc/fstab entry (e.g. see https://wiki.archlinux.org/index.php/NTFS-3G ).

It won’t be the last time.

The reason I said ‘owned by root’ is that every time I tried to access it, I had to use roots password.
Thanks for the link, bookmarked it for further study.

And thanks for your link, another for better understanding of things.
BTW, I would not dare to touch one of my NTFS (wndows) partitions. That is the reason I don’t want any Linux installers touching my MBR/GPT.
If I live long enough I may get by without windows completely. But hat is far down the road for me.

Hmmm. Watching you, I think you will be surprised. I think you understimate yourself.:wink:

HA! you corrected my typo, and I found yours. LOL.
I don’t underestimate my abilities, to do, to learn, to apply. I also don’t underestimate how long I may last, days or 15 more years
I don’t like to air this sort of thing publicly. On a good day I have 20% of my heart function left. Corollary>>> there aren’t that many ‘good’ days.