[SOLVED] apache2: configuration of mod_dav, mod_dav_fs
Howdie,
I gotta question about the configuration of mod_dav and mod_dav_fs on a apache2 instance. What I've got:
On a mountpoint (specifically: /var/data/) I have mounted a 3tb raid partition that stores all kind of data and I would like to share it through WebDAV. So I installed davfs2 on my client and set up the server site by adding:
Code:
ScriptAlias "/var/www/webdav" "/var/data"
<Directory "/var/www/webdav">
Dav On
</Directory>
Finally I added the www-data user to the media group, which is the group that has read/write access to all the /var/data stuff (file mode for all contents is 660, chown is "some_owner_which_is_part_of_media:media").
Then a a2enmod mod_dav and a restart of the apache should arise it to life. Ok, fine until here. I mounted the davfs on my client pc and it worked like a glance. At least it looked like that. The contents were listed and I was happy. Later I tried to open some file on my client, but sadly it failed with an IO error. And here the problems begin.
I then looked at the apache logfiles and I immediatly saw the problem. Some kind of weird permission error comes up?! When I for example try to edit a dummy text file created on the server, it fails with something like this in the log message:
Code:
Failed to execute "/var/data/test.txt"
So I gave it execute permissions (chmod +x), but that didn't help. Then I realized that the /var/data mountpoint is mounted with the noexec option. Which means nothing can be executed and this is perfectly fine. Noone who puts data on that partition should be able to execute anything from it. As I can't say who puts what where, I wanna go the safe way and disallow any kind of execution of (possible malicious / virused) data.
So, is WebDAV really that stupid that it wants to execute a file when someone tries to open it remotely or am I doing something wrong?!