Solved

Qmail pipe to perl script access denied error

Posted on 2004-09-11
4
459 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
  • 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 500 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to enable SSH in Ubuntu. 7 105
linux, squid, exchange 14 179
best simple nfs export and fstab commands for basic sharing? 3 89
How to identify SSH user interactive login? 15 85
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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