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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Press Ctrl+Alt+T to go to a terminal and type:
sudo mkdir /var/szDirectoryName sudo chmod a+rwx /var/szDirectoryName
szDirectoryName is the name of the directory you would like,
a means "all" (users)
+ means "add the following rights" and
write and e
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
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.
To give all permissions to all the users, use the following command:
chmod -R a+rwx /path/....
Note: It's Usually not recommended to give every user every permission of a directory, be careful while using this command.
To give permissions to a specific user:
sudo chown -R username:grouname /folder_path