on my little Linux box (Ubuntu 12.04), I got an hard disk auto-mounted on /mnt/storage (relevant
/etc/fstab line here):
#/dev/sdc1 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 www-data:x:33:janesconference janesconference:x:1000:
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 deniedeven 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'?