"public_html" owner and group change?

gundamz

Well-Known Member
Mar 27, 2002
245
0
316
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?
 

UpsideOut

Member
Feb 4, 2003
16
0
226
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.
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
10
343
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
 

RedFutura

Well-Known Member
Jun 11, 2003
72
0
156
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 ;)
 

bonnmac

Well-Known Member
Apr 26, 2003
101
0
166
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?
 

bonnmac

Well-Known Member
Apr 26, 2003
101
0
166
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.
 

Website Rob

Well-Known Member
Mar 23, 2002
1,501
1
318
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