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.

"public_html" owner and group change?

Discussion in 'General Discussion' started by gundamz, Nov 16, 2003.

  1. gundamz

    gundamz Well-Known Member

    Joined:
    Mar 27, 2002
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    drwxr-x--- 36 baby nobody 4096 Aug 27 20:05 public_html/


    Supposely, "public_html" should have baby:baby as the owner and group. Am i right?


    However, now, all the "public_html" on the server have username:nobody settling. Any one have the same problem?
     
  2. UpsideOut

    UpsideOut Member

    Joined:
    Feb 4, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    I had this problem only on one server. It caused CGI's outside of the cgi-bin to fail. A quick chown and chmod solved the problem.
     
  3. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    The quick way to change them all.

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

    This will change the owner and group back


    for CPAccess in `ls -A /var/cpanel/users`; do chmod 755 /home/$CPAccess/public_html; done

    This one sets the access to 755
     
  4. UpsideOut

    UpsideOut Member

    Joined:
    Feb 4, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Very elegant solution, dgbaker!
     
  5. RedFutura

    RedFutura Well-Known Member

    Joined:
    Jun 11, 2003
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    If you set it that way then you will have problems with phpsuexec which will give you 404 or 403 errors when loading the website.

    It should be user:nobody. It is normal if you have problems executing cgi's outside cgi-bin, for security reasons. That is why the cgi-bin forlder was invented for ;)
     
  6. bonnmac

    bonnmac Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Okay, I have users who's cgi scripts aren't working, however public_html is nobody.user and cgi bin is user.user Now, they aren't getting 500 errors, they are getting 404 errors, and files are there. Any ideas?
     
  7. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    public_html should be: user.nobody
     
  8. bonnmac

    bonnmac Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    That's what I meant, sorry. public_html is user.nobody already. cgi-bin is user.user and cgi files are user.user & chmodded to 0755 because we have suexec installed.

    Weird thing is scripts were working, and all the sudden stopped. Just a 404 page not 500 or other configuration error.
     
  9. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    I just had a look in: /var/cpanel/users

    Two accounts (on different Servers) that were created "just today" have different settings. I have not heard back from either account, about any problems, but wonder if your problem is related to that file -- seems to be the only thing left. ;)

    Look for the ID's of the problem accounts:
    see if their settings are: root.root
    see if accounts without problems are: cpanel.root
     
Loading...

Share This Page