Halaman

Selasa, 14 April 2015

Recursively chmod only on directories or files

A Very simple neat trick to chmod the directories/files
chmod 755 $(find /path/to/base/dir -type d)
and
chmod 644 $(find /path/to/base/dir -type f)
alternative: executing one by one, instead..
for files:
sudo find . -type f -exec chmod 644 {} \;
for directories
sudo find . -type d -exec chmod 755 {} \;
And if you are using that chmod, you are likely using that for your web server. Don't forget to install suPHP on apache, and then setup the configuration at /etc/suphp/suphp.conf and on your virtual host(s) add the 
php_admin_flag engine off
suPHP_Engine on

or perhaps using the fast-cgi approach

Cheers! :D

Tidak ada komentar:

Posting Komentar