To change the permission of single file we use chmod
command as:
chmod 0666 /home/new/abc
In the above command,
- 0666 is the file permission
- /home/new/abc is the path of the file of which I want to change the permission. You can change them as per your requirement.
That's It !chmod 0744 /home/new/abc /home/new/test
chmod -R 0740 path/of/the/directory
find /path/of/the/directory -type f -perm 0755 -exec chmod 0644 {} \;
find /path/of/directory/ -not -path "/pathof/directory/not/include*" -type f -perm 755 -exec chmod 644 {} \;
find /home/your_account/public_html -name filename | xargs chmod 444
Check out the blog to get detailed explanation of the above given commands.