How can I give full permission to folder and subfolder
I'm new to Ubuntu and need to create a new folder in /var and need all users on the machine to have full permissions to this folder.
How should I proceed?
53 Answers
Press Ctrl+Alt+T to go to a terminal and type:
sudo mkdir /var/szDirectoryName
sudo chmod a+rwx /var/szDirectoryNameWhere szDirectoryName is the name of the directory you would like, a means "all" (users) + means "add the following rights" and rwx means read, write and execute respectively...
Note: there already is such a directory in /var which all users have access to: tmp (full path: /var/tmp) which itself is symlinked to /tmp.
Beware however that all files in /tmp are deleted at boot time.
For any further information, here is a great resource on all directories in Linux.
5Open Terminal
Create Directory with mkdir:
sudo mkdir /var/DirectoryNameTo give all permissions to a folder give chmod -R 777:
sudo chmod -R 777 /var/DirectoryName 3 Below gives all permissions to everybody to all files and subdirectories:
chmod -R a+rwx path