Apache WebDAV Create Permissions

Is it possible to configure Apache to create files in webDAV directories using permissions 775 instead of 755? If not, how is it possible to allow write to anyone other than the web server?
 
Sadly, no. I have to sudo when moving files in to webdav storage on the local machine and then sudo change permissions. You could cron the permissions part, that's the best I came up with when Googling about this.
 
I think good way is change umask for www user.
Alternative, and this should be better - look at this link
At work we're using ssh to access the repositories. This causes constant permission problems, as a user writes the files as themself, leading to situations where the files aren't writable by others. Neither umask or the sticky bit on the db/ directory seem to fix it reliably. So, I added this line to the end of hooks/post-commit:

cd /path/to/repository/db && chmod g+w *
 
This is very unfortunate :-( But thanks for all your suggestions.

Instead of cron you could also write a little shell script that changes the owner on the WebDAV files and make this script available to the www-data group through visudo (/etc/sudoers) without typing a password... That would be my workaround. I haven't tried it yet though.

Best
Rainer
 
Wow, you're right Alt! I didn't know about umask. I just added
Code:
umask 002
to my /etc/apache2/envvars and now it's all fine!

Thank you for this valuable hint,
Best
Rainer
 
Back
Top