Page 1 of 1

cgi-bin perl scripts not working - heeeeelp please

Posted: Mon Apr 16, 2012 5:50 pm
by faris
Well, following what I thought was a successful migration, it turns out nothing in any of our hosted site's cgi-bin is working. trying to access any of them gives a 403 error and the following in the site's error_log:

Code: Select all

(13)Permission denied: /home/httpd/vhosts/domain.tld/cgi-bin/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
(don't let the reference to .htaccess fool you -- this is a generic error. There is no .htaccess - the script I'm testing with is just a hello world script)

There's nothing in suexec.log

Just for once, the great god Google does not help me, nor does any KB.

Code: Select all

drwxr-x---   2 ftpuser psacln   4096 Apr 16 22:33 cgi-bin

Code: Select all

# ls -al
total 16
drwxr-x---  2 ftpuser psacln 4096 Apr 16 22:33 .
drwxr-xr-x 21 root    root   4096 Apr 13 22:51 ..
-rwxr-xr-x  1 ftpuser psacln   90 Apr 16 22:10 hw.cgi
-rwxr-xr-x  1 ftpuser psacln   90 Apr 16 22:33 hw.pl
If I chmod cgi-bin to 755 it works fine. However, this is not how it is supposed to be.

So this is some sort of permissions thing.

I do note suexec doesn't seem to be different to the default one:

Code: Select all

]# ls -al /usr/sbin/suexec*
-r-s--x--- 1 root apache 27280 Nov  2 12:52 /usr/sbin/suexec
-r-s--x--- 1 root apache 27280 Nov  2 12:52 /usr/sbin/suexec.saved_by_psa
There's another one in /usr/local/psa/suexec that's a different size:

Code: Select all

# ls -al /usr/local/psa/suexec/psa-suexec
-r-s--x--- 1 root apache 24648 Nov  2 12:52 /usr/local/psa/suexec/psa-suexec
In the old days, I seem to remember there were problems with the plesk-centric suexec being overwritten when suexec got updated by yum, and you were supposed to copy it back from somewhere.

I'm wondering if the psa-suexec should be copied over to /usr/sbin/suexec?

Can someone check the sizes of theirs for me please? I'm on EL6 x86_64 with Plesk 10.4.4 MU26

And any other suggestions would be appreciated!!!!!

Re: cgi-bin perl scripts not working - heeeeelp please

Posted: Mon Apr 16, 2012 6:01 pm
by faris
OK, well I went ahead and copied the psa-suexec over the suexec and restarted apache, but no difference.

Re: cgi-bin perl scripts not working - [SOLVED]

Posted: Tue Apr 17, 2012 4:55 am
by faris
Interesting.

Seems cgi-bin needed to be chowned ftpuser.psaserv (not 755, obviously, and not ftpuser.psacln which is what was causing the problem)

It isn't clear where this issue came from - a Plesk bug or a Migration Manager bug.

Re: cgi-bin perl scripts not working - heeeeelp please

Posted: Tue Apr 17, 2012 5:44 am
by Kalimari
Have noticed similar permission/ownership issues with group name "psaserv" vs "psacln" since migrating to 10.4 which I never encountered previously.
Plesk directories are supposedly set to "psaserv" group, and files to "psacln" group, in practise they are all set to psacln when using ftp and I suppose migration manager is affected also.
Glad you were able to resolve the issue.

Re: cgi-bin perl scripts not working - heeeeelp please

Posted: Tue Apr 17, 2012 10:48 am
by faris
Thanks Kalimari.

In a way, I'm glad the migration manager doesn't try to fiddle with ownerships or permissions -- I might have set them in a certain way. On the other hand, it seems to me that there's a big bug somewhere because this has happened on three systems, all 8.6 -> 10.4.4 so there's obviously something being missed somewhere. On the other other hand (i have three) there's also no reference to this in an KB or even on the forum, so I wonder if I've found some new little twist that needs to be looked into.