Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
1  
I'm not sure I understand the question, but defaults for NTFS means full permissions for users. –  htorque Jun 18 '11 at 8:34
    
@htorque, that's exactly what I wanted to know - answered myself from Googling a bit more. –  Oxwivi Jun 18 '11 at 8:38

3 Answers 3

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-write
  • suid: set-user-identifier or set-group-identifier bits take effect
  • dev: interpret character or block special devices
  • exec: permit execution of binaries
  • auto: auto-mount or allow mount -a
  • nouser: only root is allowed to mount
  • async: 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
share|improve this answer
    
It does say rw, but to who? To root? To user? That's what I wanted to know. –  Oxwivi Jun 18 '11 at 8:40
    
@Oxwivi: All users are able to read and write with option rw. –  Takkat Jun 18 '11 at 8:46
    
I chose my own answer since you did not include what I wanted to know in the answer. –  Oxwivi Jun 21 '11 at 9:41
up vote 1 down vote accepted

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.

share|improve this answer
    
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 option users (example given in my answer). –  Takkat Jun 21 '11 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. –  Oxwivi Jun 21 '11 at 11:08
    
If 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. –  Takkat Jun 21 '11 at 11:35
    
@Takkat, gotcha, thanks. –  Oxwivi Jun 21 '11 at 11:37

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.

share|improve this answer
    
Immediately ran into problems with permission, so I changed 022 and 133 to 077 and 177. –  Brady Trainor Aug 5 at 22:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.