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.

cpanel mistakes or random error?

Discussion in 'General Discussion' started by rachelm, Oct 21, 2008.

  1. rachelm

    rachelm Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    94
    Likes Received:
    1
    Trophy Points:
    8
    Not sure what's going on the last 24 hours but I work for WHM Xtra and I programmed something for the cpanel frontend to rechown the public_html to user.user (replace user with real account username). This was to fix the odd problem of files that get left uploaded owned by root or nobody.

    This worked fine across 150 servers that it was tested on. But the last day I've had ppl complaining that this is giving them 403 forbidden errors. I don't get that, my script does nothing but chown -R user.user public_html which is the correct ownership (it doesn't touch the www symlink which of course should be chowned user.nobody) and it doesn't chmod anything.

    But in the last 24 hours it seems to be somehow causing the 403 errors, and those that have tested it say it only happens on first use, and my script works fine after that.

    Haven't checked who's running what versions but either this is an error with cpanel non stable versions (as most of them are running) or cpanel has changed the required ownership for public_html.

    I'd just like to know which it is so I can compensate for it, as I hate ppl telling me my coding doesn't work when it not only should but it's been tested on over 100 servers before being released.

    It's only the last 24 hours this has been happening so hopefully someone at cpanel can shed some light on this for me please. Thanks in advance.
     
  2. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    have you actually looked in the apache logs to see the 403 error reason? have you accidently made the .htaccess files unreadable by apache or something along those lines?
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    These types of issues should be submitted via our ticket system at https://tickets.cpanel.net/submit/
     
  4. rachelm

    rachelm Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    94
    Likes Received:
    1
    Trophy Points:
    8
    Nick, I'm awaiting the ssh info for one of the broken servers so I can check into it more but my script can't possibly be the root cause of this, it runs only a simple chown command, it does not touch chmod at all (and apparently chmod 755 on the public_html fixes it but again, my script doesn't have the ability to chmod anything).

    Nor does that part of the program touch .htaccess files, it's literally the same chown command you'd use via ssh.

    Ken, I may end up submitting it, but first I just wanted to know if cpanel changed the required ownership or permissions on public_html. That's not a question that really warrents a support ticket, and I'd hate to open a ticket for something that may turn out to not even be a cpanel issue but some random event.

    So far it's only happening on 60 servers and I can't reproduce the error on any of my test servers, will update this post when I figure it out.
     
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    That's understandable. We like to work with our 3rd-party developers to ensure issues they may be encountering while integrating with our product are handled efficiently and quickly.

    We have not changed the ownership requirements of the public_html directory. We also have not released updates for non-EDGE branches for a few weeks as we work toward 11.24. Hence the issue probably lies else where (mis-configured Apache handler for example).
     
  6. sirdopes

    sirdopes Well-Known Member
    PartnerNOC

    Joined:
    Sep 25, 2007
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    error

    I checked a few servers and they all have the group set to nobody. The permissions on the folder are set to 750. It sounds like since you are changing the group to the user, apache is throwing the 403.

    drwxr-x--- 2 admin nobody 4.0K Oct 19 01:17 public_html
     
  7. rachelm

    rachelm Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    94
    Likes Received:
    1
    Trophy Points:
    8
    owner of public_html should be user.user

    owner of www symlink should be user.nobody

    folder perms should be 755

    that is the actual correct stuff. Now the user.user part works fine, but something was causing the perms to go off until they manually chmod the folder to 755 (750 still gives errors).

    Course this depends on software involved. And the user was saying it only happened the first time they used the script, it works fine after that.

    I suspect he was using some old beta files and not upgrading properly as I told him to. Since I brought that to his attention he hasn't complained since.
     
Loading...

Share This Page