You may be using upstart on ubuntu. If so then see if
/etc/init/php5-fpm.conf exists. If it does, edit that file and add `umask
0002` (or whatever umask you like). See
http://stackoverflow.com/questions/21248904 for an explanation.
On Monday, 30 January 2012 10:47:49 UTC+13, Brian Mercer wrote:
>
> On Saturday, December 24, 2011 11:38:55 PM UTC-5, ominds wrote:
>>
>> Perfect. Thanks. In case anyone needs this on ubuntu, I modified the
>> script located in:
>>
>> /etc/init.d/php5-fpm and changed the following in do_start()
>>
>> start-stop-daemon --start --quiet ......
>>
>> to
>>
>> start-stop-daemon --umask 0007 --start --quiet ......
>>
>> Can't say I tested it. But I think it will do.
>>
>>
>>
>> On Dec 24, 10:13 pm, Antony Dovgal <t....@daylessday.org> wrote:
>> > On 12/24/2011 09:06 PM, ominds wrote:
>> >
>> > > I want files written by PHP-FPM to have umask 0002 without having to
>> > > modify each PHP application and call the umask() PHP function. Is
>> > > there a way I can do that?
>> >
>> > > I have way too many scripts, many of which are ready PHP apps (e.g.
>> > > wordpress, Drupal) that I prefer not modifying individually. PHP-FPM
>> > > is called by NGINX if that makes any difference.
>> >
>> > Add "umask <value>" to the script that starts FPM in your distro,
>> whatever it is.
>> >
>> > --
>> > Wbr,
>> > Antony Dovgal
>> > ---http://pinba.org- realtime profiling for PHP
>
>
>
> I've tried this on Ubuntu 11.10 and I can't get it to work.
>
> If I'm starting the php-fpm master process with start-stop-daemon --umask
> 0007 as root, and then that root master process spawns the workers as
> www-data, are those children supposed to inherit the umask?
>
--
---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.