1

I have been trying to setup the magento site but have been playing around with permissions which has resulted in the following error in the suexec.log

[2014-04-25 08:20:56]: uid: (5015/web12) gid: (5011/client7) cmd: .php-fcgi-starter
[2014-04-25 08:20:56]: target uid/gid (5015/5011) mismatch with directory (33/33) or program (33/33

Any ideas how i can get it so that the uid and gid match?

I have done id www-data and 5011/client7 is against that user.

Any help would be great.

karel
  • 110,292
  • 102
  • 269
  • 299
tjhack
  • 123
  • 1
  • 7

1 Answers1

0

It seems that httpd is trying to run .php-fcgi-starter script using suEXEC as user web12 group client7 (uid:5015,gid:5011) and script or directory owner has uid:33 and gid:33.

suEXEC allow to run script with a user/group defined by SuexecUserGroup directive. Target user/group must be the same as the user/group that owns script and directory.

Probably you need to run:

chown -R web12:client7 /var/www/php-fcgi-scripts/web12

suEXEC performs a lot of check before run a script, here is useful link for more details.

Lety
  • 5,994
  • 2
  • 28
  • 36
  • where is the php-fcgi-starter located? if i run the above command will it interfere with other websites that are on the same server? – tjhack Oct 04 '14 at 19:27
  • try `find / -name ".php-fcgi-starter"` this will give you the right path. It seems that you installed [mod_fcgid](http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html), I don't know if some of yours applications relies on this module. – Lety Oct 04 '14 at 20:08
  • Running that command shows lots of files which runs through the whole system it seems – tjhack Oct 04 '14 at 20:15
  • Oh! How many file did you found? Unfortunately the error message did not show path. Could you post on http://pastebin.com/ `find / -name ".php-fcgi-started" -exec ls -l {} \;` so it shows file properties. – Lety Oct 04 '14 at 20:21
  • Again too Many files – tjhack Oct 04 '14 at 20:33
  • Sorry, you got error, right? try `find /var -name ".php-fcgi-started" -exec ls -l {} \;` – Lety Oct 04 '14 at 20:55
  • No errors but found var/www/php-fcgi-scripts/web12 where there is the php-fcgi-starter if that helps – tjhack Oct 04 '14 at 21:05
  • Did you try chown command? Could you post `ls -l /var/www/php-fcgi-scripts/web12` command output? – Lety Oct 04 '14 at 21:08
  • drwxr-xr-x 2 www-data www-data 30 2014-10-04 21:48 web12 – tjhack Oct 04 '14 at 21:16
  • Probably www-data as uid and gid 33, that is why you got error. You can see this with `id www-data` – Lety Oct 04 '14 at 21:23
  • So running the chown command will fix it? – tjhack Oct 04 '14 at 21:26
  • It should fix. How many files are in those folder? If you are worried, you could change only .php-fcgi-started and directory web12 too, and than let's see if it work. `chown web12:client7 /var/www/php-fcgi-scripts/web12` and `chown web12:client7 /var/www/php-fcgi-scripts/web12/.php-fcgi-started` – Lety Oct 04 '14 at 21:31
  • Now all websites have gone down really need help now – tjhack Oct 05 '14 at 06:46
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/17631/discussion-between-letizia-and-tjhack). – Lety Oct 05 '14 at 12:34
  • All sorted apache had stopped thanks for your help – tjhack Oct 05 '14 at 12:34
  • I'm glad to have helped you. – Lety Oct 05 '14 at 12:40