I'm running lighttpd
on my linux server. I have set up webdav
, and I want to set the umask to a specific value only for the webdav
site, and not for any other sites running under my lighttpd
server. Is there any way to tell webdav
under lighttpd
to use a specific umask?
Note that I am using the standard debian build for lighttpd
and lighttpd-mod-webdav
from apt
. I would prefer to not build any of this from source, if at all possible.
Here is the configuration I'm using for the webdav
site ...
server.username = "www-data"
server.groupname = "www-data"
[... etc. ...]
$HTTP["url"] =~ "^/webdav/" {
webdav.activate = "enable"
webdav.is-readonly = "disable"
webdav.sqlite-db-name = "/var/www/etc/lighttpd.webdav.db"
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/var/www/etc/.htaccess"
auth.require = (
"" => ( "method" => "basic",
"realm" => "Restricted.",
"require" => "valid-user"
)
)
}
Also ...
# /usr/sbin/lighttpd -V
lighttpd/1.4.35 (ssl) - a light and fast webserver
Build-Date: Aug 2 2016 09:50:21
Event Handlers:
+ select (generic)
+ poll (Unix)
- rt-signals (Linux 2.4+)
+ epoll (Linux 2.6)
- /dev/poll (Solaris)
- eventports (Solaris)
- kqueue (FreeBSD)
- libev (generic)
Network handler:
+ linux-sendfile
- freebsd-sendfile
- solaris-sendfilev
+ writev
+ write
- mmap support
Features:
+ IPv6 support
+ zlib support
+ bzip2 support
+ crypt support
+ SSL Support
+ PCRE support
+ mySQL support
+ LDAP support
- memcached support
+ FAM support
+ LUA support
+ xml support
+ SQLite support
+ GDBM support
Thank you very much for any insights or suggestions.
One possible solution: You can run two instances of lighttpd, and have one proxy back to the other one. The backend can be started up using a different umask (and even run under different user account) for handling webdav.
This appears to be impossible without modifying
lighttpd-mod-webdav
. I will work on that, and I am giving up on trying to solve this using standardlighttpd
facilities.