Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Sep 2001
    Posts
    315

    Default chmod 644 for files and 755 for directories

    Hi

    Is there a command or a script, where I can do the following:

    chmod 644 for all files including files in subdirectories
    chmod 755 for all directories including all directories

    We are using phpsuexec and sometimes we have to fix customer scripts and this is quite time consuming.

    Thanks
    Michael

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Yup:

    find /path/to/chmod -type d | xargs chmod -v 755
    find /path/to/chmod -type f | xargs chmod -v 644
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. Replies: 28
    Last Post: 06-11-2010, 01:03 AM
  2. Cpanel folder chmod 755
    By beau in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 06-16-2008, 10:52 AM
  3. PHP can not create dirs with chmod 755
    By geraldo in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-18-2007, 10:16 AM
  4. Unable to CHMOD a dir back to 755
    By Xiode in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 07-17-2007, 05:21 AM
  5. cpanel creating inbox with wrong chmod 644
    By zurca in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-30-2004, 07:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube