The commands for modifying file permissions and ownership are:
chmod – change permissions
chown – change ownership.
A new folder was created on a data partition called /DATA/SHARE
# sudo chmod -R ugo+rw /DATA/SHARE
The breakdown of the above command looks like:
sudo – this is used to gain admin rights for the command on any system that makes use of sudo (otherwise you'd have to 'su' to root and run the above command without 'sudo')
chmod – the command to modify permissions
-R – this modifies the permission of the parent folder and the child objects within
ugo+rw – this gives User, Group, and Other read and write access.
Changing the ownership of a file or folder is equally as simple:
chown -R "Username" /DATA/SHARE (Replace Username with real username to whom you want to give ownership)
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
Username – the new owner of the folder
/DATA/SHARE – the directory to be modified
- 67 Users Found This Useful
Kindly share some details about VPS hosting?
We are currently offering VPS hosting services from two different locations (USA &...What is Virtual Private Server (VPS) Hosting?
Virtual Private Servers (VPS) are the most advanced step in server virtualization technology and...Why should I choose VPS hosting?
You can choose the Virtual Private Server if you are designers, webmaster and if you are running...What level of control do I receive with my VPS package?
We provide you with full root access to the system which means you can modify server...Do you perform data backups for VPS users?
Yes, we do provide free weekly backup of VPS users which could be obtained upon request.