Solved

Qmail pipe to perl script access denied error

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

23 Experts available now in Live!

Get 1:1 Help Now