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
- 0 Users Found This Useful
-
How to Change PLESK MAILBOX DIRETORY FROM /var/mail TO /home/var/mail
If you want to change Plesk mailbox directories please review this technical article for...
How to change virtual hosts location in Plesk for LinuxIF you want to change virtual hosts location in plesk for linux. Please check below article for...
What is Virtual Private Server (VPS) Hosting?Virtual Private Servers (VPS) are the most advanced step in server virtualization technology and...