Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Using Apache / WebDAV / mod_auth_mysql, is it possible to restrict users' (or groups') access to specific directories as defined in the MySQL auth table?

More specifically, I would like to specify which directories a WebDAV user is allowed to access based on data that exists inside the MySQL table. For example, if I had a user management interface built in Python or PHP in that allowed me to specify the directory a user would be allowed to access to, I would save this on the same row as the user's user / pass pair that mod_auth_mysql uses to auth WebDAV users. How do I configure the mod_auth_mysql block to specify the directory a user is allowed to access? Or would this be done elsewhere?

share|improve this question

1 Answer 1

If you're using Apache, you can just use Apache's standard access control mechanisms ("require user", "require group", etc. inside of of blocks). There's nothing particularly special about WebDAV.

As for your second paragraph, that I'm not sure about. An ugly solution, if your permissions aren't changing all that often, would be to have an external script general an Apache configuration from the database and then restart Apache.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.