I want bind some folders in my Home directory with some folders in a NTFS partition. Will mounting the NTFS partition with only the defaults
parameter affect my read/write access?
3 Answers
Default mount options are:
rw,suid,dev,exec,auto,nouser,async
This means that by using defaults
in fstab the drive will be:
rw
: read-writesuid
: set-user-identifier or set-group-identifier bits take effectdev
: interpret character or block special devicesexec
: permit execution of binariesauto
: auto-mount or allowmount -a
nouser
: only root is allowed to mountasync
: I/O to the filesystem should be done asynchronously
These options can be adapted to personal needs. All possible options are listed in the mount manpage.
For mounting an NTFS filesystem you may want to add the options: uid=0,gid=46,umask=007,nls=utf8
.
This would be an example fstab
entry for NTFS-filesystem using LABEL rather than UUID where all users are allowed to mount:
LABEL="NTFS_Disk" /media/windows ntfs umask=007,gid=46,uid=0,nls=utf8,noauto,users 0 0
Mounting a partition with defaults
parameter will give all users read/write access. As quoted from Swerdna's openSUSE mounting tutorial:
To mount your NTFS partition permanently, add your version of the following line into the file system table,
fstab
. [and leave the last line in the file as a blank line.] Recommended option for world-writeable mount:/dev/sdb1 /path_to/mount_point ntfs-3g defaults 0 0
When you reboot, the partion will mount into the folder /path_to/mount_point with permissions drwxrwxrwx, i.e with read/write access for everybody, in the style of Microsoft's insecure filesystems.
-
Note that only root will be allowed to mount this drive with option
defaults
. If non-root users need to be able to mount use optionusers
(example given in my answer).– TakkatJun 21, 2011 at 10:52 -
@Takkat, won't using
defaults
mount the partition on boot? So users won't be able to unmount (since it was done by root) and subsequently won't need the ability to remount.– OxwiviJun 21, 2011 at 11:08 -
1If it was an external drive it could get unplugged (by accident) and couldn't be remounted without reboot or root-access. Not much of a problem but worth noting.– TakkatJun 21, 2011 at 11:35
The word "bind" appears in the title, but appears not to be addressed on this page. I fell upon a configuration which seems to work (add to /etc/fstab
):
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=3030BD846F74E514 /media/iam/ntfspartition ntfs-3g uid=1000,gid=1000,dmask=022,fmask=133 0 0
/media/iam/ntfspartition /e ntfs-3g bind 0 0
To find UUID
, compare
ls -l /dev/disk/by-id
ls -l /dev/disk/by-label
ls -l /dev/disk/by-uuid
For uid
, use echo $UID
.
I'm very new to minding my permissions, users, groups, mounting and binding, and other factors, so if anyone has comments, please advise.
-
Immediately ran into problems with permission, so I changed
022
and133
to077
and177
. Aug 5, 2014 at 22:03
defaults
for NTFS means full permissions for users.