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
Solved

Qmail pipe to perl script access denied error

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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 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