M HYPE SPLASH
// general

How can I give full permission to folder and subfolder

By Michael Henderson

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?

5

3 Answers

Press Ctrl+Alt+T to go to a terminal and type:

sudo mkdir /var/szDirectoryName
sudo chmod a+rwx /var/szDirectoryName

Where 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.

5

Open Terminal

Create Directory with mkdir:

sudo mkdir /var/DirectoryName

To 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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy