0

I have installed a second hard drive on my Ubuntu 14.04. I made the mistake of naming the owner as "Me". How can I change the ownership to my log on ID?

1 Answer 1

1

If the disk is mounted on /media/usb1/ you can do

sudo chown $USER:$USER -R /media/usb1

the same command applies for SATA mounted disks as well, the disk would be mounted at /media/<UUID>. You can run sudo blkid to find the UUID of your partition and replace <UUID> with the actual UUID of your device.

and it will set ALL user and group permission to the user you are doing this with.

removed comment

4
  • Not USB. SATA on MB. Nov 10, 2014 at 14:28
  • @TheodorePLundgren it is all the same; only the directory is different. Edit into your question the mount point of the disk and I'll change the answer.
    – Rinzwind
    Nov 10, 2014 at 14:45
  • ted@ted-desktop:~$ sudo blkid [sudo] password for ted: /dev/sda1: UUID="d522ab8f-f466-4de0-9608-2e4804f2fb2f" TYPE="ext4" /dev/sda5: UUID="6a023b35-821e-4ae4-815c-f478d2c9cea7" TYPE="swap" /dev/sdb1: LABEL="New Volume" UUID="B2A4045BA4042507" TYPE="ntfs" Nov 10, 2014 at 14:50
  • I formatted the drive to Ext4: ted@ted-desktop:~$ sudo blkid -c /dev/null /dev/sda1: UUID="d522ab8f-f466-4de0-9608-2e4804f2fb2f" TYPE="ext4" /dev/sda5: UUID="6a023b35-821e-4ae4-815c-f478d2c9cea7" TYPE="swap" /dev/sdb1: LABEL="NewDrive" UUID="d92b8ac6-e894-47dd-aff4-5c3095765ae0" TYPE="ext4" Nov 10, 2014 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .