Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

chmod 644 for files and 755 for directories

Discussion in 'General Discussion' started by CoolMike, Nov 5, 2005.

  1. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    316
    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. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Yup:

    find /path/to/chmod -type d | xargs chmod -v 755
    find /path/to/chmod -type f | xargs chmod -v 644
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice