Solved

Qmail pipe to perl script access denied error

Posted on 2004-09-11
4
444 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now