Linux is very secure os and many time you don’t have access to read or write folder and files. Sometimes when you want to install a local server like “xampp” or “Local” and You want to edit your project folder but you can’t create a new project in your xampp folder because the folder is secure and you can only watch the folder files. To change to permission you need to do this steps:
- Open the linux terminal by type ctrl+al+T;
- When you enter to the terminal you need to navigate to the folder, example if my folder(folder name:myfolder) exist in the desktop folder you need to write this comment: “cd /Desktop” .
- Now you need to choose the permission you want to your folder by typing: “sudo chmod 777 myfolder”
- The number 777 mean that the folder “myfolder” get full permission Read,Write,Execute. The First number is the user permission , the second number is the specific group permission and the third number is all other users in the group. (First number – 7 -User , Second number – 7 – group , Third number 7 – other users, 777)
- The other option: number 1 – execute , number 2 – write , number 4 – read.
- The number 7 is the all option – 1+2+4 = 7.
- Example: If you want to give only read permission you type “sudo chmod 444 Tal”. (First number – 4 -User , Second number – 4 – group , Third number 4 – other users, 444).
- Now after you change the type of the permission , you need to change who get to access the folder by typing this comment: “sudo chown tal:tal myfolder”. the first name “tal” after the word “chown” is my user name , the second tal is the group name.
- You can give the permission to the root user and root group like this: “sudo chown root:root myfolder”.
This is very basic tutorial how to change permissions in linux os , if you want more info , you can show in this link: https://help.ubuntu.com/community/FilePermissions.
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.