Page 1 of 1

centos suexec breaks scripts from running bad! Any help?

Posted: Thu Feb 24, 2011 6:23 pm
by aus-city
Damn suexec is blocking my scripts and causing issues.

[2011-02-25 08:58:28]: uid: (10001/aus-city) gid: (505/psacln) cmd: ultimatebb.cgi
[2011-02-25 08:58:28]: target uid/gid (10001/505) mismatch with directory (10001/504) or program (10001/505)
[2011-02-25 08:58:45]: uid: (10001/aus-city) gid: (505/psacln) cmd: ultimatebb.cgi
[2011-02-25 08:58:45]: target uid/gid (10001/505) mismatch with directory (10001/504) or program (10001/505)
[2011-02-25 08:59:01]: uid: (10001/aus-city) gid: (505/psacln) cmd: ultimatebb.cgi
[2011-02-25 08:59:01]: target uid/gid (10001/505) mismatch with directory (10001/504) or program (10001/505)
[2011-02-25 09:00:01]: uid: (10001/aus-city) gid: (505/psacln) cmd: auto_pickup.pl
[2011-02-25 09:00:57]: uid: (10001/aus-city) gid: (505/psacln) cmd: mail.cgi
[2011-02-25 09:01:27]: uid: (10001/aus-city) gid: (505/psacln) cmd: mail.cgi

How can I fix this. For now I renamed /usr/sbin/suexec to suexec.disabled and restarted httpd, at least stuff runs!

What's a proper way to fix it?

Thanks!

Re: centos suexec breaks scripts from running bad! Any help?

Posted: Fri Apr 29, 2011 12:29 pm
by hostingguy
change the file ownership to match the directory owner or vice versa.

Re: centos suexec breaks scripts from running bad! Any help?

Posted: Sun May 01, 2011 7:07 pm
by aus-city
But that will break plesk, as these scripts are in the domains /cgi-bin and uploaded with the domain user, the directory on cgi-bin is not the same group as the domain, its defaulted that way by plesk.

Re: centos suexec breaks scripts from running bad! Any help?

Posted: Sun May 01, 2011 11:09 pm
by hostingguy
Plesk wont care unless you try and use the file manager to manage the files.

Re: centos suexec breaks scripts from running bad! Any help?

Posted: Mon May 02, 2011 7:38 pm
by faris
Have you used the Plesk-specific suexec or might you have accidentally overwritten it with the default centos one?

Re: centos suexec breaks scripts from running bad! Any help?

Posted: Mon May 02, 2011 8:26 pm
by aus-city
It's the plesk one, I verified that firstly.

The scripts live in a sub directory in cgi-bin and these are the domain user/group the same as httpdocs.

I will try changing their group to match cgi-bin

I put them in cgi-bin as they don't run in httpdocs.