0

I've read this: How do I correctly mount a NTFS partition in /etc/fstab? plus lots of other related web pages

My fstab entry:

#Entry for /dev/sdb2: 
UUID=1C77E5134D44D900   /home/me/Libraries  ntfs-3g fs-name=Library,x-gvfs-symbolic-icon=Library,permissions,nosuid,nodev,noexec,uid=1001,gid=1001,rw,umask=22,dmask=27,fmask=137    0   0

This mounts as me correctly in the correct place but there are three issues:

  1. Nautilus, when clicking on "Other Locations", shows the name as 290GB Volume" even though the name in gparted is shown as "Libraries"

    Fixed with ntfslabel command

  2. Even though "permissions" is set, I still can't change file permissions in any files as myself or even using sudo.

  3. mount command shows:

    /dev/sdb2 on /home/me/Libraries type fuseblk (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
    

I would expect it to show my uid although the mount directory /home/me/Libraries shows my ownership. What am I doing wrong? The only difference I see is I don't use LABEL="Libraries" but use ntfs-3g fs-name=Library,x-gvfs-symbolic-icon=Library instead.

Update:

I changed the fstab line to

LABEL=Library /home/john/Libraries ntfs-3g fs-name=Library,x-gvfs-symbolic-icon=Library,permissions,nosuid,nodev,uid=1001,gid=1001,rw,dmask=27,fmask=137 0 0

Tried these commands:

$ ll temp.QIF 
-rw-r----- 1 john john 167 Jul 24  2016 temp.QIF

$ chmod 666 temp.QIF ; echo $?
0

$ ll temp.QIF 
-rw-r----- 1 john john 167 Jul 24  2016 temp.QIF

Note that permissions do not change. chmod returns a 0 indicating no error.

jpezz
  • 1,120
  • I see under answer below you've posted comments on new progress. Is the progress reflected in above question? Thanks. – WinEunuuchs2Unix Nov 12 '17 at 14:05
  • This is beside the point, but if you have an fmask and dmask, you don't need a umask, since an fmask applies to files, a dmask applies to directories, and a umask applies to files and directories, and in this case, the fmask and dmask are more restrictive than the umask. – wjandrea Nov 13 '17 at 00:38
  • Try removing noexec from the options. – wjandrea Nov 13 '17 at 02:36
  • What specific chmod commands have you tried? – wjandrea Nov 13 '17 at 02:36

1 Answers1

0
  1. I think Nautilus is using the label (not the fs-name). You can try to set the label.

  2. The permissions and ownership of Microsoft file systems in linux are set when mounting and cannot be modified (except if you unmount and mount with new settings). These settings are inherited to directories and files.

  3. I'm not sure (yet?) what is the problem with this item. But it works for me according to this link, How do I use 'chmod' on an NTFS (or FAT32) partition?

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • the "permissions" option should allow me to change permissions of files and subdirectories. As to problem 3, it is strange what the mount command shows because everything is owned by me, not by root and I can create and remove directories at will. It acts like I own it in spite of what "mount" says except that neither "sudo chmod" nor "chmod" changes anything on existing files. – jpezz Oct 26 '17 at 19:09
  • I will try the LABEL option. – jpezz Oct 26 '17 at 19:21
  • I cannot find the option permissions in man mount. Maybe it is not intended literally, but a mask (umaskor fmask or dmask) is intended; 2. Good luck with LABEL :-)
  • – sudodus Oct 26 '17 at 19:36
  • @ sudodus "permissions" is mentioned in "man mount.ntfs-3g". Mount.ntfs-3g is supported in Ubuntu as of 11.o. See: https://help.ubuntu.com/community/MountingWindowsPartitions – jpezz Oct 27 '17 at 01:47
  • @jpezz, You are right. Thanks for pointing to man mount.ntfs-3g; I will look into the details. I am not sure what this text means: "permissions Set standard permissions on created files and use standard access control. This option is set by default when a user mapping file is present." It seems to me that the settings in a user-mapping file will override the options uid=, gid=, umask=, fmask=, dmask= and silent. But I am not sure (I don't think) that individual permissions for files and directories will be possible. – sudodus Oct 27 '17 at 05:34
  • Latest info. I found I had to use gnome-disks to change the filesystem label (I guess gparted only changes the partition label and then using the LABEL= in the /etc/fstab makes Nautilus show disk name as Library. As to the real problem, permissions, from what I read, gnome sees the disk as being mounted in user space and changes disk to type fuseblk which seems to somewhat interfere with the ntfs-3g settings and is probably the reason mount command shows what it does. – jpezz Oct 27 '17 at 17:32