DEV Community

San
San

Posted on • Updated on

How to give permission to any folder/file Linux ubuntu

 Go to a terminal and type:

sudo mkdir /var/myfolder
sudo chmod a+rwx /var/myfolder
Enter fullscreen mode Exit fullscreen mode

Explain:

*Where * **myfolder **is the name of the directory.

  • a means "all" (users)

    • means "add the following rights"
  • and rwx means read, write **and **execute

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

Enter fullscreen mode Exit fullscreen mode

Top comments (0)