Change ownership of external drive

40,807

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.

Share:
40,807

Related videos on Youtube

DevRandom
Author by

DevRandom

Updated on September 18, 2022

Comments

  • DevRandom
    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.

    enter image description here

    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
      duxk.gh over 9 years
      I added an answer but I'm not quite sure what you meant by "without destroying the permissions on the drive".
    • DevRandom
      DevRandom over 9 years
      I thought lost+found should be hidden from writing from a non-root account.
    • Andrea Lazzarotto
      Andrea Lazzarotto over 9 years
      Do 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
      DevRandom over 9 years
      It doesn't matter. What would you do?
  • WoodrowShigeru
    WoodrowShigeru about 3 years
    This doesn't work for me (Ubuntu 18). Does it make a difference if I'm using sudo -i instead of su? Is this relevant? Because su 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?