I have a NTFS partition, and I want to share a folder, but I want to manage the access of the subfolders, for example this folder contains 20 subfolders, the desktop users have access to only 10 subfolders. How can I manage this? How can I control a NTFS partition at all?
You can mount the NTFS partition with read-write permissions for root only
where
/dev/sdaX
is the NTFS partition device, and/media/root-view
is a mountpoint, to be created if necessary (obviously, you can choose the name you like).Then install
bindfs
allowing to mount a directory on a mountpoint with modified permissions. The bind mount would be established as followwhere
shared
is a directory you want to share, and/media/user-view
is another mountpoint, to be created if needed, as above.Now all users have read-write access to
/media/user-view
, representing the/shared
folder on the NTFS partition, and no access to other directories on the same partition.You can repeat the
bindfs
for all directories of your interest, but would be better to reorganize the content of the NTFS partition, putting all directories to share inside a single directory. I mean, change the layout fromto
With this layout you only need to share the directory
/shared
, giving automatic access to all sub-directories.