Command line: File ownership
Changing the ownership of a file or folder is equally as simple. Say Jacob moved a folder for Bethany into the SHARE directory – but Jacob still has ownership. This can be changed with a simple command:sudo chown -R bethany /DATA/SHARE
Let's break this down.
-
sudo – admin rights must be used since we are dealing with a folder that belongs to another user
-
chown – the command for changing ownership
-
-R – the recursive switch to make sure all child objects get the same ownership changes
-
bethany – the new owner of the folder
-
/DATA/SHARE – the directory to be modified
Ref :
https://www.linux.com/learn/how-manage-file-and-folder-permissions-linux
No comments:
Post a Comment