Using chown to change ownership on additional HDD
OS Linux 20.04. Having installed an additional HDD in position /dev/sdc1
(Label Data 22) I am confronted with root as owner.
Is either of the following syntaxes correct in order to set me up as owner?
sudo chown Robert Data 22
sudo chown Robert /dev/sdc1
Generally one would change the permissions via the mount point rather than the device name. For example, if the device you listed above is mounted at /project/data
, then you could do something like this:
sudo chown robert:robert /project/data
If you wanted every file and directory contained in that path to also be owned by the account name, then you could add a -R
to the command:
sudo chown -R robert:robert /project/data