The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

All file permissions wrong

Discussion in 'General Discussion' started by MeHost, Nov 28, 2012.

  1. MeHost

    MeHost Member

    Joined:
    Apr 14, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Howdy y'all,

    I am used to using cPanel and WHM as a normal user and not as root, so i'm finding loads of things which i normally don't need to change, anyway... I was using PHP handler 'dso' and files were uploaded as 'nobody' so everyones total disk space was utterly wrong.

    Following my ticket in cPanel tickets, i was told to get my server admin to look into this, but thats me lol. I have 50 accounts so doing every file manager would take YEARS!

    Is there a command vie SSH or i have WHMExtra if that helps ?

    Cheers
     
  2. bbrink68

    bbrink68 Active Member

    Joined:
    Nov 27, 2012
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Sure if you google hard enough ;)

    Her is an SSH command to do so on a user to user basis:
    for files to 644

    Code:
     find /home/usernamehere/public_html/ -type f -exec chmod 0644 {} \;
    For folders:
    Code:
     find /home/usernamehere/public_html/ -type d -exec chmod 0755 {} \;
    For owner of files:
    Code:
     find /home/usernamehere/public_html/ -type f -exec chown username:username {} \;
    For owner of directories:
    Code:
     find /home/usernamehere/public_html/ -type d -exec chown username:username {} \;
    I am sure there is a better way incorporating a for loop. Also you may look into installing suphp fix which will automate the process.
     
  3. MeHost

    MeHost Member

    Joined:
    Apr 14, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Wow,

    Many thanks for your help and commands bbrink86, things is, i now have 70 accounts and a slow internet connection, so theat would take for ever, is there a way to fix everything in one script ?

    Many thanks
     
Loading...

Share This Page