cgi-bin perl scripts not working - heeeeelp please

Community support for Plesk, CPanel, WebMin and others with insight from two of the founders of Plesk. Ask for help here! No question is too simple or complicated. :-)
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

cgi-bin perl scripts not working - heeeeelp please

Unread post 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!!!!!
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

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

Unread post by faris »

OK, well I went ahead and copied the psa-suexec over the suexec and restarted apache, but no difference.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

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

Unread post 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.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Kalimari
Forum Regular
Forum Regular
Posts: 526
Joined: Wed Jan 02, 2008 3:21 pm
Location: United Kingdom

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

Unread post 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.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

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

Unread post 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.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Post Reply