Set all directories to 755, and all files to 644


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » System Level » File System

Set all directories to 755, and all files to 644Last Modified: Mar 27, 2015, 4:05 pm
If you need a quick way to reset your public_html data to 755 for directories and 644 for files, then you can use something like this:

cd /home/user/domains/domain.com/public_html
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;


additionally, if you know php runs as the user and not as "apache", then you can set php files to 600, for an extra level of security, eg:

find . -type f -name '*.php' -exec chmod 600 {} \;


2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST