Okay, I've got a pretty good one (I think anyways): I'm trying to get
a specific criteria of mail to be written to a directory in which my
web server has access to it. I can get the file written to the
directory just fine, but here's the rub: procmail sets the
permissions on all the files it creates to 600, but for web access, it
needs to be 644. How do I get procmail to change the permissions on
just the file it is trying to create in the web-readable directory?
Here's the relevant sections from my .procmailrc file:
DATE_YYMM=${DATE_YYMM:-`/bin/date +%y%m`}
:0:
*^Subject:.*Expired mail on tcsn
{
:0c
/usr/local/www/data/expiry/tcsn/$DATE_YYMM.txt
:0
| "/bin/chmod +r /usr/local/www/data/expiry/tcsn/$DATE_YYMM.txt"
}
and here's the resulting log entry:
procmail: Match on "^Subject:.*Expired mail on tcsn"
procmail: Extraneous locallockfile ignored
procmail: Locking ".lock"
procmail: Unlocking ".lock"
procmail: Assigning "LASTFOLDER=/usr/local/www/data/expiry/tcsn/9809.txt"
procmail: Opening "/usr/local/www/data/expiry/tcsn/9809.txt"
procmail: Acquiring kernel-lock
procmail: Executing "/bin/chmod +r /usr/local/www/data/expiry/tcsn/9809.txt"
/bin/chmod +r /usr/local/www/data/expiry/tcsn/9809.txt: Can't open /bin/chmod +
r /usr/local/www/data/expiry/tcsn/9809.txt
procmail: Assigning "LASTFOLDER=/bin/chmod +r /usr/local/www/data/expiry/tcsn/9
809.txt"
Thanks for any help.
Bryan
--
+------------------------+------------------------+
| Bryan Albright | bryana(_at_)uswest(_dot_)net |
+------------------------+------------------------+
| Man who live in glass house, dress in basement. |
+-------------------------------------------------+