?
Solved

Qmail pipe to perl script access denied error

Posted on 2004-09-11
4
Medium Priority
?
468 Views
Last Modified: 2010-05-18
Hi,

I have set up the Qmail default to pipe all email messages to a perl script with | preline /path/to/script

But when email sent the following is bounced back :

Hi. This is the qmail-send program at p15161102.pureserver.info.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<12776850-4814@sharpmail.co.uk>:
preline: fatal: unable to run /home/httpd/vhosts/sharpmail.co.uk/cgi-bin/site/incoming-mail.cgi: access denied

--- Below this line is a copy of the message.


Any ideawhat would be the cause of this, is this a Qmail or perl problem?

Regards,

Danny
0
Comment
Question by:sharpmail
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:e-tsik
ID: 12034262
Hi :-)

All you need to do is to allow QMail to run the script:

chmod a+rx /home/httpd/vhosts/sharpmail.co.uk/cgi-bin/site/incoming-mail.cgi

This command allows all users (including the QMail user) to read and execute the script you have installed.
0
 

Author Comment

by:sharpmail
ID: 12035235
I did that command still the same :s
0
 
LVL 9

Accepted Solution

by:
e-tsik earned 1500 total points
ID: 12037028
OK. Then how about

chown -R httpd.httpd /home/httpd/
chmod -R a+rx /home/httpd/

The first line changes the owner of all files under /home/httpd to httpd (and group httpd). If your apache user is different, specify otherwize.
The second assures the all users can read and execute files under /home/httpd

If one of the folders above /home/httpd/vhosts/sharpmail.co.uk/cgi-bin/site/ is not allowed access to the apache user, then it will be blocked and you'll get an error message (just as got do now).
0
 

Author Comment

by:sharpmail
ID: 12037794
found it out last night, sorry i didnt post before now, but you were very much on the right track!

I dont know ssh commands very well didnt realise that 1st was was just a chmod 755 on the script at first. turned out i needed to chmod the cgi-bin 755 as it was too low to allow qmail to run so i did that and the pipe works fine, just need to debu my script now as its not fully working :S the joys of moving servers!

Since you pointed me in the right direction have the jucy points, and thanks for your assistance!

Danny
0

Featured Post

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question