Antonio Pérez wrote:
> On Sun, Aug 31, 2008 at 7:18 PM, Alvaro Lopez Ortega <[EMAIL PROTECTED]> 
> wrote:
> 
>>> Anyone with this problem?.
>> Well, I'd say that's the expected behavior, actually.
>>
>> This is what is happening in your case:
>>
>>  1.- Cherokee is executed as root, but you want it to drop privileges
>>  2.- It opens the log files (as root)
>>  3.- It becomes www-data right after that
>>  4.- Works for a while, until it receives SIGUSR2
>>  5.- It tries to reopen the files but it cannot
>>
>> So, at least the issue is consistent with what you wanted it to do. If you
>> want the server to run as www-data, you cannot expect it to be able to
>> reopen root files.
> 
> So, why if it is running as www-data, it can write to log files owned
> by root but it can't do it when it receives SIGUSR1?.

Because it opened it while it was root. Then, it dropped the privileges 
and became www-data. So, from that point on there is no way it can 
become root again (that's the whole point to becoming another user).

> (Have you changed it now to SIGUSR2?).

Yes, only in trunk (the upcoming 0.9) though.  Yesterday I spent quite 
some time unifying the Cherokee interfaces; so, unless I have made a 
mistake it should remain like that.

>> What would be for you the expected behavior?
> 
> I expect this:
> 
> 1.- Cherokee is executed as root, but I want it to drop privileges
> 2.- It becomes www-data.
> 3.- It opens the log files (as www-data)
> 4.- Works for a while, until it receives SIGUSR2
> 5.- It tries to reopen the files and it can.

Since it *IS* running as www-data, there is no way it can reopen a root 
file with perms 644.

Have you done this with other software? I might be missing something.

-- 
Greetings, alo
http://www.alobbs.com/
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to