The guide is aimed to show you how to allow multiple local users to read and write (create, delete, rename, modify...) all files (including newly created ones) from a shared directory and its subdirectories. If you want to set up more advanced permissions for different users and/or group try ACLs.

About bindfs

bindfs is a FUSE filesystem for mounting a directory to another location (mountpoint), with permission settings. It allows you to specify the ownership and permissions of the files from inside the mountpoint.

4. Remove the user form the list of allowed users to connect to the X server:

Code:

xhost -SI:localuser:username

5. Setting the permissions at boot time

Method 1 - fstab

NOTE: Because of a BUG in mountall this method doesn't work, in Ubuntu 9.10 or higher (including Natty 11.04 Alpha-1), if the shared directory is not on the root (/) partition. For a workaround see Method 2 - Upstart below.

Re: HowTo: Create shared directory for local users (with bindfs).

Looks like a good tutorial. I haven't had a chance to try it yet, but curious as to what the benefit of this is over simply adding all of your target users to a regular group, making the folder writable by the group and enabling the group access to all future files.

Other then with bindfs, where all users think they own all the files (which I'm not convinced is a good thing. ), both solutions would appear to work the same. Is that a correct interpretation, or are their other benefits gained here?

Re: HowTo: Create shared directory for local users (with bindfs).

Originally Posted by CornMaster

Looks like a good tutorial. I haven't had a chance to try it yet, but curious as to what the benefit of this is over simply adding all of your target users to a regular group, making the folder writable by the group and enabling the group access to all future files.

Other then with bindfs, where all users think they own all the files (which I'm not convinced is a good thing. ), both solutions would appear to work the same. Is that a correct interpretation, or are their other benefits gained here?

The main benefit is that the new files created in the shared directory will inherit the ownership & permissions.

Re: HowTo: Create shared directory for local users (with bindfs).

I hope you don't mind this because I think BINDFS is a gift and I wouldn't have known about it if not for you, but I have a few suggestions:

ITEM 2i/2ii

You're creating a directory "/home/shared" then chmod'ed directory "/media/shared". I would vote for /home/shared because automounting /media/shared will cause an icon on the desktop. When a user tries to unmount it ( he has no need to unmount it but he'll still try ) he can't because he's not root.

ITEM 3

You might want to show them how to unmount it from the terminal. It may not be obvious how one does that.

ITEM 3.i.2

Most likely I need to read the manual more carefully but I can't get past this example.

When I first read it I interpreted it to mean that user1,2,3, AND groupX had read / write permissions but it doesn't work. Something like this does:

Then I figured that what it meant was that user1,2, and 3 related to the "7" in "perms" and groupX related to the "5". But that doesn't work either because "mirror-only" blocks the group out. The only way I can get this to work under this assumption is this way:

Re: HowTo: Create shared directory for local users (with bindfs).

Originally Posted by Morbius1

I hope you don't mind this because I think BINDFS is a gift and I wouldn't have known about it if not for you, but I have a few suggestions:

ITEM 2i/2ii

You're creating a directory "/home/shared" then chmod'ed directory "/media/shared". I would vote for /home/shared because automounting /media/shared will cause an icon on the desktop. When a user tries to unmount it ( he has no need to unmount it but he'll still try ) he can't because he's not root.

ITEM 3

You might want to show them how to unmount it from the terminal. It may not be obvious how one does that.

fixed

Originally Posted by Morbius1

ITEM 3.2

Most likely I need to read the manual more carefully but I can't get past this example.

When I first read it I interpreted it to mean that user1,2,3, AND groupX had read / write permissions but it doesn't work. Something like this does:
Then I figured that what it meant was that user1,2, and 3 related to the "7" in "perms" and groupX related to the "5". But that doesn't work either because "mirror-only" blocks the group out. The only way I can get this to work under this assumption is this way:

In 9.04 everything works as expected. In 10.04 the /DATA mount point is empty.

I can recreate the error in 10.04 by commenting out both lines in fstab then:

- adding the bindfs line first followed by a sudo mount -a
- then adding the normal mount line for /DATA followed by a sudo mount -a.

I receive an error: mount: according to mtab, bindfs is already mounted on /DATA
And the partition is empty. Based on this it would appear that the bindfs line is being executed before the normal mount line. Maybe there was some kind of mechanism that prevented that from happening in 9.04 and now it's missing. Or maybe the accelerated boot process in 10.04 has claimed another victim.

Anyway, this is a long winded way of asking you if you have had any problems using bindfs in 10.04.