Category Covered

ubuntu file permission

Use the following command to set permission on ubuntu

Only for specific folder:

chmod 75 /opt/lampp/htdocs 

To change all the directories to 755 (-rwxr-xr-x):

find /opt/lampp/htdocs -type d -exec chmod 755 {} \; 

To change all the files to 644 (-rw-r--r--):

find /opt/lampp/htdocs -type f -exec chmod 644 {} \; 

Or you can use the following command also

If you want to set permissions on all files to a+r, and all directories to a+x, and do that recursively through the complete subdirectory tree, use:

chmod -R a+rX *