In开发者_C百科 the postfix main.cf I have configured service to invoke external php script.
smtp inet n - - - - smtpd -o content_filter=myservice:www-data
myservice unix - n n - 1 pipe
flags=Rq user=me null_sender=
argv=/home/me/my_script.php
so far so good, my_script.php is executed. It creates the file my_file.txt in home dir. However I can only manage
-rw------- 1 me www-data 16 2009-10-11 19:35 my_file.txt
How do I add 'r' permissions for www-data group ?
You can explicitly set that in your script.
You also haven't specified the group your script is running as (the group= parameter).
Why do you need to grant group permissions in the first place? That to me is generally (not always) a flag indicating lack of proper design.
精彩评论