Posted By

axertion on 02/11/12


Tagged

Shell linux centos


Versions (?)

Chown all folders 755, files 644 in Linux


 / Published in: Bash
 

Sets the permissions for all folders to 755, and for all files 644.

Useful for SUPHP configurations which required this specific permission setup.

  1. find . -type d -print0 | xargs -0 chmod 0755 # For directories
  2. find . -type f -print0 | xargs -0 chmod 0644 # For files

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: ModServ on February 11, 2012

Thank you,

Another suggestion:

chmod -R 755 *; find -type f -print0|xargs -0 chmod 644

You need to login to post a comment.