Change permissions of a USB hard drive

Hello everyone,
I needed to reformat my USB hard drive and used gparted to do this. The owner is now root. I myself would like to be the owner with read and write permissions. I can’t manage to change that!

What filesystem did you create on your USB hdd ?

I created ext4

Gparted hast nothing to do with this.

  • The owner of a file on a ext4 filesystem is set, when the file is created.
    So create any directory / file on it, then change the owner to yourself.

  • The owner of the “root=/” of your ext4 filesystem is the owner of its mountpoint
    So change the ownership of the mountpoint to yourself

There is a [HowTo] about this, but i did not find it yet. :man_shrugging:

maybe [root tip] [How To] Mount partition using fstab

1 Like
sudo chown -R $USER:$USER [path/to/device]

It doesn’t work. :innocent:I did:

sudo chown -R root:micha /run/media/micha/

XY problem. Read the tutorials I posted. :wink:


Wrong Command should be sudo chown -R micha:micha /run/media/micha/

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.