1find . -type d -exec chmod 700 {} \;
1find . -type f -exec chmod 600 {} \;
use the -R
flag
1chmod 755 -R var/
1chmod +x file
On GNU/Linux chown
and chmod
have a --reference
option
1chown --reference=otherfile thisfile
2chmod --reference=otherfile thisfile
Enter the following commands to set sensible permission defaults:
1find . -type f -exec chmod 400 {} \;
2find . -type d -exec chmod 500 {} \;
3find var/ -type f -exec chmod 600 {} \;
4find media/ -type f -exec chmod 600 {} \;
5find var/ -type d -exec chmod 700 {} \;
6find media/ -type d -exec chmod 700 {} \;