On 7.1.2010, at 11.44, Stephan Bosch wrote:

>> I did however choose to have a different dir layout, the sieve storage is 
>> under /var/spool/sieve/ which has permissions 1777 and is owned by 
>> root:root. Therefore the chown(dir, -1, 0) call is failing, as the parent 
>> dir does not belong to the group of the user but to root.
> Ok.
> I try to provide administrators like you with much flexibility, and I don't 
> see why this kind of directory structure should be discouraged. Timo, any 
> ideas? I guess I can implement a check to handles this situation gracefully.


I think this should be handled the same way as Dovecot does if mail root's 
parent directory is 01777. Now, I'm not sure what Dovecot actually currently 
does in that situation.. :) v1.1 might do whatever, I think v1.2+ would try to 
make it 0777 and shouldn't try to change the group to root, because the group 
doesn't matter since it's world-rwx anyway. That doesn't seem to be the best 
solution though. Maybe it should check if the +t bit is set and then use 0700 
or maybe 0770 (maybe 01777 -> 0770, 01707 -> 0700?). I suppose I should write a 
function that does this so the code wouldn't have to be duplicated all around.

Reply via email to