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.

Permission Problems

Discussion in 'General Discussion' started by biggdogg285, Mar 2, 2007.

  1. biggdogg285

    biggdogg285 Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I've got my user permissions and some cPanel permission all jacked up.

    My O/S failed, so I had the DC take the primary and slave it, then add another drive.

    I copied all the files from the old drive based on this thread: http://forums.cpanel.net/showthread.php?t=63290

    But now the problem is all the permissions are wrong. I'm sure there was a better way to do this, but I was trying to learn :(

    Is there anyway to automatically correct the permissions?

    Thank you!
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Have you tried running an update? that should fix what you need.
     
  3. biggdogg285

    biggdogg285 Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Yes, I ran:
    Code:
    /scipts/upcp --force
    It did fix some problems but not alot.

    If I manually fix the permissions I can get everything working. But I can't possible do this on 120 accounts :(

    Any other suggestions would be appreciated.
     
  4. nvez

    nvez Active Member
    PartnerNOC

    Joined:
    Jul 17, 2006
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    What exact permissions are not right?
     
  5. biggdogg285

    biggdogg285 Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Most of the permissions in /home/username/*.*

    Instead of most being user:user, they are root:root

    I am recopying the accounts, EXCEPT this time, im using cp -Rfp which seems to be retaining the permisions.

    Wish I would of done this the first time, but I'm a n00b :eek:
     
  6. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Oh I see... you have ownership problems and or permission problems.

    Run this script, it will apply the correct ownership to the accounts.

    If you do not run phpsuexec, you should run this periodically for accurate space
    usage of your clients. Dump it in /etc/cron.daily

    #!/bin/bash
    cd /var/cpanel/users
    for user in *
    do
    chown -R $user.$user /home/$user/public_html/*
    done
     
  7. biggdogg285

    biggdogg285 Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thanks for your help, I appreciate it!
     
Loading...

Share This Page