mail2s9y.php permission errors

Creating and modifying plugins.
Post Reply
digerati
Regular
Posts: 5
Joined: Thu Jan 26, 2006 7:39 pm

mail2s9y.php permission errors

Post by digerati »

I am having a problem getting this script to actually work. I believe i have followed the instructions to the
best of my ability thus far.

I was getting all sorts of errors at first but now I am getting a permission error.

Here is the mail log
sending mail from a gmail account to my moblog account on my server at thebatchfile.com

Mar 27 17:38:27 TBF05 postfix/smtpd[18963]: connect from zproxy.gmail.com[64.233.162.192]
Mar 27 17:38:27 TBF05 postfix/smtpd[18963]: 16BE69FACF: client=zproxy.gmail.com[64.233.162.192]
Mar 27 17:38:27 TBF05 postfix/cleanup[18964]: 16BE69FACF: message-id=<op.s63il4o1dapoyh@waco2218.waco-domain.com>
Mar 27 17:38:27 TBF05 postfix/nqmgr[18248]: 16BE69FACF: from=<digeratimvp@gmail.com>, size=1421, nrcpt=1 (queue
active)
Mar 27 17:38:27 TBF05 postfix/local[18966]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Mar 27 17:38:27 TBF05 postfix/local[18966]: 16BE69FACF: to=<moblog@thebatchfile.com>, relay=local, delay=0,
status=bounced (Command died with status 126: "/var/www/html/thebatchfile/html/cellblog.php [moblog] [password]".
Command output: sh: line 1: /var/www/html/thebatchfile/html/cellblog.php: Permission denied )
Mar 27 17:38:27 TBF05 postfix/cleanup[18964]: 467239FAD4: message-
id=<20060327233827.467239FAD4@mail.thebatchfile.com>
Mar 27 17:38:27 TBF05 postfix/nqmgr[18248]: 467239FAD4: from=<>, size=3394, nrcpt=1 (queue active)
Mar 27 17:38:28 TBF05 postfix/smtp[18969]: 467239FAD4: to=<digeratimvp@gmail.com>,
relay=mail.cableone.net[24.116.0.226], delay=1, status=sent (250 message sent ok)


I get mail back and it says:

<moblog@thebatchfile.com>: Command died with status 126:
"/var/www/html/thebatchfile/html/cellblog.php [moblog] [password]".
Command output: sh: line 1: /var/www/html/thebatchfile/html/cellblog.php:
Permission denied
Final-Recipient: rfc822; moblog@thebatchfile.com
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; Command died with status 126:
"/var/www/html/thebatchfile/html/cellblog.php [moblog] [password]".
Command output: sh: line 1: /var/www/html/thebatchfile/html/cellblog.php:
Permission denied

Any ideas?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

It's saying you're not allowed to execute /var/www/html/thebatchfile/html/cellblog.php. Does that file exist, and is it readable and executable for everybody?
Judebert
---
Website | Wishlist | PayPal
digerati
Regular
Posts: 5
Joined: Thu Jan 26, 2006 7:39 pm

Post by digerati »

judebert wrote:It's saying you're not allowed to execute /var/www/html/thebatchfile/html/cellblog.php. Does that file exist, and is it readable and executable for everybody?
I moved it and named it back to what it should be and I still get
Command output: sh: line 1: /home/moblog/mail2s9y.php: Permission denied )
in the maillog.

Its 777 too?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Does it still return status 126? That's bash for "not executable". Mode 777 includes execute for everybody, though.

Perhaps the problem is that sh is handling it. We want PHP to execute the file, not sh. But PostFix probably only uses sh. We could make sh call php by adding a shebang line. Just make the first line in the file look like:

Code: Select all

#!/path/to/php/php
Keep it executable, of course. Let me know what happens.
Judebert
---
Website | Wishlist | PayPal
Post Reply