Ubuntu – How to yield all users the read/write permission for files in a the common directory

16.04mountpartitioningpermissions

I have installed Ubuntu system at an SS disk and I wish users to access partitions of the second (mechanical) disk as common depositories with full read/write/delete permissions for each file. And I wish that each user see such a partition (say /dev/sdb7) as a directory with a fixed name (say /home/the_user/F). I was advised (Is it possible to mount a partition as a common depository for users with the same relative path?) to mount the partition during boot and to symlink that mountpoint to somewhere in the user's home. However, in the manual for

link

I see an option

‘-d’
‘-F’
‘--directory’
     Allow users with appropriate privileges to attempt to make hard
     links to directories.  However, note that this will probably fail
     due to system restrictions, even for the super-user.

I am afraid of it. Please advise me an example of a proper link; and the corresponding group or bindfs commands to be used at user login or once forever by the root. Thanks!

Best Answer

You don't need to use hard links, actually we can not create a hard link to a directory because it makes loop in file system hierarchy.

You have to use -s option to create a symlink (symbolic link):

Let's say I have mounted /dev/sda7 on /media/some/mount/point. To create a link to this path I have to run:

ln -s [target] [symlink]

Like:

ln -s /media/some/mount/point  /home/username/F

The permission of link would be 777 but however a symlink is a different file from you actual directory, it only grant access to symlink itself and the user must have correct permissions to be able to work with the files in /media/some/mount/point.