Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    9

    Default Reset default permissions

    Been diggin for a little bit figuring this would be easy to find but can't seem to. I want to reset the permissions on a user directory to what they should be by default. I need to do this because I copied a directory from another server which seems to have very incompatible permissions. I've been manually resetting things to what I think is right but I'm not exactly sure. I have to do this with about 100-150 more users so a automated method would definetly help me out a bit.

    Thanks!

  2. #2
    Member
    Join Date
    Aug 2004
    Posts
    14

    Default

    Bump

    I have a similar issue after a server crash and need to get permissions reset for everyone.

  3. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    I believe there is a fix script in /scripts/ that can do this for you. I'm not online using my normal office machine at the moment so I am unable to look this up to provide specifics.

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Quote Originally Posted by Mykul31217 View Post
    Bump

    I have a similar issue after a server crash and need to get permissions reset for everyone.
    Running these from SSH one by one should work;

    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess; done

    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:mail /home/$CPAccess/etc /home/$CPAccess/mail; done

    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:nobody /home/$CPAccess/public_html; done

    /scripts/chownpublichtmls

    Depending on how you're setup you might need these:

    find /home*/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
    find /home*/*/public_html -type f -perm 0666 -exec chmod 644 {} \;

    To take care of one users account this may be all you need.

    chown -R usernamehere:usernamehere /home/user/public_html/* ;

    Don't run any of them if you're unsure what you're doing. Hire someone to help might be the best option.

Similar Threads & Tags
Similar threads

  1. File permissions being reset to 644
    By cemper in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-21-2007, 05:15 PM
  2. reset permissions
    By jsen in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-27-2007, 07:32 AM
  3. /tmp permissions have to be reset every day
    By ShortSchoolBus in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-10-2005, 11:50 AM
  4. How To Reset All Mysql Permissions
    By techv in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 04-12-2004, 08:41 PM
  5. Email CGI Permissions Reset
    By Drew Nichols in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-03-2004, 12:25 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube