cpanel mistakes or random error?

rachelm

Well-Known Member
Verifed Vendor
Jan 26, 2005
94
1
158
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.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
458
cPanel Access Level
Root Administrator
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.
These types of issues should be submitted via our ticket system at https://tickets.cpanel.net/submit/
 

rachelm

Well-Known Member
Verifed Vendor
Jan 26, 2005
94
1
158
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.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
458
cPanel Access Level
Root Administrator
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.
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).
 

sirdopes

Well-Known Member
PartnerNOC
Sep 25, 2007
141
0
66
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
 

rachelm

Well-Known Member
Verifed Vendor
Jan 26, 2005
94
1
158
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.