Advice Needed regarding Sudo/Permissions

I recently ran into this when partitioning a 2TB external USB HDD for backups.
Made three partitions - 1 NTFS and 2 ext4.
Found out later that the NTFS partition was owned by ‘me’ but the two ext4 partitions were owned by ‘root’ and I could not write to them as a ‘regular’ user :confused:
I just used the ‘chown’ command to take ownership of them.

sudo chown -R user_name:group_name directory_name

The -R is ‘recursive’ as I was taking ownership of the whole Directory and wanted that ownership to apply to all the files inside of it.

The Linux Handbook site has some good examples. I think I cannot post links yet so just go to linuxhandbook dot com /chown-command

3 Likes