Change ownership of external drive
Solution 1
If you have root access then fire up your terminal and write
su
Password: (enter your root password here.)
Now mount your HDD (if not already mounted). And type
chown -R "username_youwant" path_to_folder/folder_name
And now you're done!
It is generally a good practice to mount your HDDs in the /media
or /mnt
directory.
Solution 2
You go do this all through terminal, but I personally find it easiest to run my file manager (I use nemo but nautilus is default) as root and to change permissions graphically.
So open up a terminal and run gksudo nautilus
.
Open the properties like you did in the screenshot. Since you're root now, you will be able to change it to your user.
This, however, is probably a better place to find a well explained answer.
Related videos on Youtube
DevRandom
Updated on September 18, 2022Comments
-
DevRandom over 1 year
I just bought a new SATA disk that I've now formated into ext4 using gparted. When I ran Gparted, I ran it as root. Now, I can't write files to the drive because I'm not the owner of the drive.
The drive has a folder called lost+found . I'm primary going to store virtual machines on the drive.
Now my question is the following; What is the best way (most secure?) to make me the owner of the drive without "destroying" the permissions on the drive (I'm thinking of the lost+found folder).
Thanks in advance!
-
duxk.gh over 9 yearsI added an answer but I'm not quite sure what you meant by "without destroying the permissions on the drive".
-
DevRandom over 9 yearsI thought lost+found should be hidden from writing from a non-root account.
-
Andrea Lazzarotto over 9 yearsDo you want to mount the whole drive as yours or do you just want to be able to put files on it? You could create a directory and set the ownership to you, then you could put files inside that directory.
-
DevRandom over 9 yearsIt doesn't matter. What would you do?
-
-
WoodrowShigeru about 3 yearsThis doesn't work for me (Ubuntu 18). Does it make a difference if I'm using
sudo -i
instead ofsu
? Is this relevant? Becausesu
won't accept a blank password – and I never set any root password. Does it need to be the mountpoint or can I change ownership of any subdir?