View Full Version : Did you switch to suexec with cPanel?
ffeingol
09-24-2007, 06:35 PM
Hello,
I'm just wondering how people handled switching to LSWS/phpsuexec and cPanel. We've tried it on one small server and run into all sorts of permissions problems (files owned by nobody:nobody). I'm sure we could run find commands and either change the ownership or the permissions but I'm wondering how people have handled it that have already switched.
Thanks,
Frank
medialayer
09-29-2007, 03:05 PM
#!/bin/sh
for i in `ls /var/cpanel/users`
do
if [ -d /home/$i/public_html ]
then
chown -R $i:$i public_html/*
chown $i:nobody public_html
chmod 0750 public_html
fi
done
ffeingol
09-29-2007, 03:12 PM
medialayer,
Are you suggesting that code or have you actually used that on a cPanel server?
Thanks,
Frank
medialayer
09-29-2007, 03:31 PM
medialayer,
Are you suggesting that code or have you actually used that on a cPanel server?
Thanks,
Frank
I did use something fairly similar to the above.
felosi
09-29-2007, 08:56 PM
Hello,
I'm just wondering how people handled switching to LSWS/phpsuexec and cPanel. We've tried it on one small server and run into all sorts of permissions problems (files owned by nobody:nobody). I'm sure we could run find commands and either change the ownership or the permissions but I'm wondering how people have handled it that have already switched.
Thanks,
Frank
hey on a fresh install its flawless. Ive setup 3 new cpanel servers lately as suexec with no problems at all. Converting is a bit more difficult but I dont think lsphp as suexec will give 500 errors on wrong perms liek mod_suphp does.
What medialayer posted or anything else that searches for nobody owned files will do the job.
Here is another you can sue for chmods of folders inside pub_html
find /home -perm 777 | xargs chmod 750
and so on.
But yeah Id much rather do a fresh install with suexec then convert a server thats been running as nobody for a while. My main server I converted it to suexec perms and owners and I ended up switching back to nobody because the server was simply too busy to run suexec and I ran into a lot of resource usage issues
medialayer
09-29-2007, 08:57 PM
but I dont think lsphp as suexec will give 500 errors on wrong perms liek mod_suphp does.
That's correct.
ffeingol
09-30-2007, 02:30 PM
Yea, it's not quite as much an issue with the 500 errors like suexec as it is with galleries etc. The files are all owned by nobody and then there are issues.
BTW, if you guys have fantastico did you have to flip the setting in fantastico to say your suexec or just leave it normal?
Frank
medialayer
09-30-2007, 02:41 PM
Well it is fairly simple to resolve the nobody issues using the quick for loop shown above.
For Fantastico you probably do need to enable that option as otherwise I would assume that it would chmod the files and folders to 666 and 777 which is not necessary.