NTFS permissions and mounting (Ubuntu 12.04)

We have a workstation with multiple hard drives formatted with ntfs file systems to allow them to play nicely with Windows. Those file systems gave me issues when trying to allow multiple users to access them from Ubuntu.

Mounting from nautilus only allowed the current user to access it, and I don't think that the ntfs file system can have its permissions changed via chmod or chgrp after it has been mounted. What ended up working (for the most part) was suggested here. In this solution, the file system is mounted with the designated permissions using mount's fmask and dmask options for an ntfs file system.

First I needed to add the necessary users to a group that could access the drives; here I added them to the existing group plugdev
id username

sudo usermod -a -G plugdev username

id username
I made a directory in /media to hold the file system:
sudo mkdir /media/DATAPART1
And then I mounted the drive, which was at /dev/sdb1 (which I located using gParted). In this case, plugdev is group id 46, and this gives full permissions to the user and group (which becomes root and plugdev, respectively).
sudo mount -t ntfs -o gid=46,fmask=0003,dmask=0002 /dev/sdb1 /media/DATAPART1
Unfortunately, I couldn't work out how to execute a file on the mounted file system without giving execution permissions on ALL files; thus every non-directory file ends up the color of an executable with this method. I also couldn't work out how to enable the sticky bit for files to protect one user's files from being deleted by another user.



Popular Posts