Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’m running Ubuntu 13.04 & trying to mount a folder using bind in /etc/fstab. Shown below is one of many similar entries;

/media/Storage1/test   /media/Storage1/WebDAV/Alex     none    bind,uid=www-data,gid=alex    0       0

The directory is mounted upon startup and if I navigate to either of these directories the files are matched. The issue I have is that the permissions are not changed!!!

In the above example (/media/Storage1)

  • /test is owned by root:root
  • /WebDAV/Alex is owned by www-data:alex

However when mounted, /media/Storage1/WebDAV/Alex is now root:root

The same is the case for all my directories mounted in this way (root is not the only owner of original directory, additionally I have tried uid=33,gid=1000)

Am I using bind incorrectly? Am I doing something hideously wrong?

share|improve this question

The bind option is not a real filesystem and does not support the uid and gid parameters. Specify the user or owner option to get the desired effect.

$ ll /tmp/moo/ -d
drwxr-xr-x 2 root root 40 Jul 24 01:07 /tmp/moo/

$ mount /tmp/moo

$ ll /tmp/moo/ -d
drwxr-xr-x 42 jaroslav jaroslav 4096 Jul 24 01:05 /tmp/moo/

$ grep bind,user /etc/fstab
/home/jaroslav/tmp /tmp/moo none bind,user      0 0
share|improve this answer
Thanks will try that when I get the chance. I'm about to go on a long as flight (how do we live without the Internet eh?! – Alex Jul 24 '13 at 5:14
We read books ;) – Ярослав Рахматуллин Jul 24 '13 at 5:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .