# Apache WebDAV Create Permissions



## dave (Oct 29, 2010)

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?


----------



## rvjr (Feb 4, 2011)

Hi Dave,

did you manage to solve this? Or what was your workaround?

Best
Rainer


----------



## dave (Feb 4, 2011)

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.


----------



## Alt (Feb 4, 2011)

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 *


----------



## dave (Feb 4, 2011)

Alt said:
			
		

> I think good way is change umask for www user.
> Alternative, and this should be better - look at this link



Thanks for the input, Alt, but I am not referring to subversion.


----------



## rvjr (Feb 5, 2011)

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


----------



## Alt (Feb 5, 2011)

dave said:
			
		

> Thanks for the input, Alt, but I am not referring to subversion.


Ok you can still do this job with umask setting


----------



## rvjr (Feb 5, 2011)

Wow, you're right Alt! I didn't know about umask. I just added 
	
	



```
umask 002
```
 to my /etc/apache2/envvars and now it's all fine!

Thank you for this valuable hint,
Best
Rainer


----------

