Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

on my little Linux box (Ubuntu 12.04), I got an hard disk auto-mounted on /mnt/storage (relevant /etc/fstab line here):

UUID=49707dae-90a7-4c67-9a46-a156980db4ab /mnt/storage    ext3    errors=remount-ro,user_xattr 0 0

/mnt/storage is to be shared with webDAV / apache2, so the directory and all its contents have user www-data and group www-data (otherwise webDAV won't work):

~$ ll /mnt
total 12
drwxrwx--- 10 www-data www-data 4096 lug  5 13:12 storage
drwxr-xr-x  2 root     root     4096 feb  3  2009 usb
drwxr-xr-x  2 root     root     4096 dic  4  2009 usbkey

User 'janesconference' (i.e. the user which I normally log in) seems to be in group 'www-data'. I added janesconference to the group with sudo usermod -a -G www-data janesconference. If I look into /etc/group, the users seems to be in the group:

~$ grep janesconference /etc/group

But if I give the groups command, it seems not to be here:

~$ groups
janesconference adm dialout cdrom plugdev lpadmin netdev admin sambashare

So, here are the questions:

  • If I ssh into the server, and try to cd to /mnt/storage, bash gives me -bash: cd: /mnt/storage/: Permission denied even if I should be in www-data group. I want to be able to access /mnt/storage from the command line. What am I missing here?
  • Better yet, is there a way for apache2's webDAV module to access /mnt/storage as user 'janesconference', instead of user 'www-data'?
share|improve this question
did this user relogin after manipulation with group? –  rush Jul 5 '12 at 11:45
No, I didn't. That answers question #1. Thx! –  janesconference Jul 5 '12 at 11:52
Looks like a job for... ACL Man! (/me leaps into phonebox) –  womble Jul 5 '12 at 11:53
To your second question: whole Apache can be run by other user (even root, but it's very stupid), by adding User youruserid Group yourgroupid to file /etc/apache2/apache.conf –  DSkowronski Jul 5 '12 at 12:53
@DSkowronski: yeah, but if I do, webDAV fails saying Could not open the lock database. in apaxche's error.log –  janesconference Jul 5 '12 at 13:26

Your Answer


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

Browse other questions tagged or ask your own question.