I’m a Linux newbie, running Manjaro/KDE for about a week. Recently, I added a USB HD to my box and partitioned it to ext4 and NTFS. The NTFS portion was for sharing with my Windows box. I managed to get this working, not via Dolphin and not the way I want, but working for now.
The etx4 partition, however, has got me scratching my head. It appears both partitions have root as the owner and group. The NTFS portion has full read/write for everyone, but the ext4 partition lacks write privileges for everyone. I’m not sure if this is “normal” or if I missed something while partitioning.
I want both partitions to act as if they’re mine; not that greedy root fellow. After some thought, it seemed I have two options (again, newbie):
Increase my user authority/privileges. This sounds like logging in as root. It feels wrong and I’m not sure it would bring the desired result (freely adding/removing files/folders in Dolphin).
Change the partition(s) owner/group. This seems like the “proper” way to take control (and pull the rug out from under that greedy root person).
I believe I can change the owner/group using chmod/chown, but I’m not sure whether I should change the owner AND the group, or just the owner. Changing owner to “me” and group to “me” feels like I’m shooting myself in the foot should my user account get scrambled (by a newbie). On the other hand, changing the owner to “me” and leaving the group as root, seems strange.
In the end, I’m the only user on this machine and its ultimate use will be an Emby media server at some point.
I know I sound like an ignorant newbie. The fact is, I am an ignorant newbie, but I’m hoping this post will ensure I don’t become a stupid, ignorant newbie.
I really need a shove down the right path. Some opinions/examples/ URLs would be nice too.
I recently ran into this when partitioning a 2TB external USB HDD for backups.
Made three partitions - 1 NTFS and 2 ext4.
Found out later that the NTFS partition was owned by ‘me’ but the two ext4 partitions were owned by ‘root’ and I could not write to them as a ‘regular’ user
I just used the ‘chown’ command to take ownership of them.
sudo chown -R user_name:group_name directory_name
The -R is ‘recursive’ as I was taking ownership of the whole Directory and wanted that ownership to apply to all the files inside of it.
The Linux Handbook site has some good examples. I think I cannot post links yet so just go to linuxhandbook dot com /chown-command
Hello everyone,
I would generally advise against taking ownership with chown, instead I would use chmod to give the user privileges. To be able to acces and write to the harddrive without becoming root, you need to type:
chmod -R +rw [path to you harddrive: usually something like /run/media/Seagate or whatever]
-R is for recursive
+rw means adding Read and Write permissons to the user
Good point. I wondered about this.
I wonder if it is possible for a user to take ownership with ‘chown’ but still not have write and execute permissions?
Any thoughts on this would be appreciated.
Chown worked on the ext4 partition (that I couldn’t write to). I thought it might be worth mentioning that it did nothing to the NTFS partition (that had full permissions anyway) and the owner and group remained as root. I suspect this is because NTFS doesn’t “respect” Linux permissions.
@VraiChevalier: When you changed your partition(s), did you change both owner and group to “you”, or did you change owner to “you” and leave group as root?