Mounts NTFS or FAT partitions with 'default_permissions', breaking Samba sharing

Bug #482641 reported by JeongHo Park
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
udisks
Won't Fix
Medium
udisks (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: util-linux

When mounting an NTFS or FAT device from Nautilus it is mounted with the 'default_permissions' option. This limits access to the mounting user and breaks Samba sharing.

Documentation of the 'default_permissions' option, and others: <http://www.mjmwired.net/kernel/Documentation/filesystems/fuse.txt>.

affects: util-linux (Ubuntu) → nautilus (Ubuntu)
Revision history for this message
Pedro Villavicencio (pedro) wrote :

This bug is an upstream one and it would be quite helpful if somebody experiencing it could send the bug the to the people writing the software. You can learn more about how to do this for various upstreams at https://wiki.ubuntu.com/Bugs/Upstream/GNOME . Thanks in advance!

Changed in nautilus (Ubuntu):
importance: Undecided → Low
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Thank you for reporting this bug. I suspect that the problem you're experiencing is related to the way you mount the NTFS partitions on start-up.
How did you make them mount automatically on launch?
Could you please attach the files /etc/fstab and /etc/mtab while the partitions are mounted?

Thanks in advance.

Changed in nautilus (Ubuntu):
status: New → Incomplete
Revision history for this message
JeongHo Park (jhpark70) wrote :
Download full text (3.8 KiB)

Hofstede, thank you for your concern.

I said 'Auto mounted' but I did not mount those NTFS partitions automatically.
It means that mount was made by clicking the hard disks in Nautilus.

Those hard disks are not shared in Samba, but manually mounted ones(by mount command in terminal) are shared fine.
Below are some information you asked.

Before Mount (Manual / Auto)

/etc/fstab
# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sdc3 :
UUID=bd1fc677-ca0a-4416-a75a-d61805b4214f / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sdc1 :
UUID=560d4ea4-345f-4867-ae1e-2c9ba1da3f58 /boot ext2 relatime 0 2
# Entry for /dev/sdc5 :
UUID=b4c54883-7d60-44d2-864f-f27743c0d5d9 /home ext3 relatime 0 2
# Entry for /dev/sdc2 :
UUID=01b42f14-d4db-458f-ad94-185f0f449434 /var xfs relatime 0 2
# Entry for /dev/sdc7 :
UUID=42210f81-091c-4412-85be-8540a7183e50 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

/etc/mtab
/dev/sdc3 / ext3 rw,relatime,errors=remount-ro 0 0
proc /proc proc rw 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
none /var/run tmpfs rw,nosuid,mode=0755 0 0
none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
none /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
/dev/sdc1 /boot ext2 rw,relatime 0 0
/dev/sdc2 /var xfs rw,relatime 0 0
/dev/sdc5 /home ext3 rw,relatime 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/nemo/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=nemo 0 0

After Mount

/etc/fstab
# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sdc3 :
UUID=bd1fc677-ca0a-4416-a75a-d61805b4214f / ext3 relatime,errors=remount-ro 0 1
# Entry for /dev/sdc1 :
UUID=560d4ea4-345f-4867-ae1e-2c9ba1da3f58 /boot ext2 relatime 0 2
# Entry for /dev/sdc5 :
UUID=b4c54883-7d60-44d2-864f-f27743c0d5d9 /home ext3 relatime 0 2
# Entry for /dev/sdc2 :
UUID=01b42f14-d4db-458f-ad94-185f0f449434 /var xfs relatime 0 2
# Entry for /dev/sdc7 :
UUID=42210f81-091c-4412-85be-8540a7183e50 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

/etc/mtab
/dev/sdc3 / ext3 rw,relatime,errors=remount-ro 0 0
proc /proc proc rw 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
none /var/run tmpfs rw,nosuid,mode=0755 0 0
none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
none /lib/init/rw tmpfs rw,nosuid,mode=0...

Read more...

Revision history for this message
In , Sense Egbert Hofstede (sense) wrote :

When mounting an NTFS (All FUSE devices affected?) device with DeviceKit it is mounted with the 'default_permissions' option. This limits access to the mounting user (and root) and breaks Samba sharing, because the client doesn't have the permissions to read the files in the directory.

This option is set when using 'devkit-disks --mount' and when using DeviceKit-disks from Nautilus.

Attached is the '/etc/mtab' file of the original reporter. The last entry was the device mounted by DeviceKit-disks, the entries above this last entry were mounted with the 'mount' command to illustrate the difference -- those two devices can be properly shared with Samba.

This bug was originally reported by JeongHo Park on Launchpad in Ubuntu at <https://launchpad.net/bugs/482641>.

Documentation of the 'default_permissions' option, and others: <http://www.mjmwired.net/kernel/Documentation/filesystems/fuse.txt>.

Revision history for this message
In , Sense Egbert Hofstede (sense) wrote :

Created an attachment (id=32690)
/etc/mtab of the original reporter

summary: - Auto Mounted NTFS partitions cannot be shared by Samba
+ Nautilus Mounted NTFS partitions cannot be shared by Samba
Revision history for this message
Sense Egbert Hofstede (sense) wrote : Re: DeviceKit mounts NTFS partitions with 'default_permissions', breaking Samba sharing

It appears that DeviceKit-disks, which is called by Nautilus to do the mounting, mounts NTFS (FUSE?) partitions with the 'default_permssions' option, limiting the permissions to the mounting user (and root). This breaks Samba sharing because of a lack of permissions on the (Windows) client.

I'm reporting this issue upstream, thank you for your feedback!

summary: - Nautilus Mounted NTFS partitions cannot be shared by Samba
+ DeviceKit mounts NTFS partitions with 'default_permissions', breaking
+ Samba sharing
description: updated
affects: nautilus (Ubuntu) → devicekit-disks (Ubuntu)
Changed in devicekit-disks (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Forgot to add that I can confirm this issue as well on an up-to-date installation of Ubuntu 10.04 'Lucid Lynx', Alpha 2.

Changed in devicekit:
status: Unknown → Confirmed
Revision history for this message
Serrano Pereira (serrano-pereira) wrote :

I'm having the same issue on an up-to-date installation of Ubuntu 9.10 'Karmic Koala'. If there's anything I can do to help, please let me know.

Martin Pitt (pitti)
summary: - DeviceKit mounts NTFS partitions with 'default_permissions', breaking
- Samba sharing
+ Mounts NTFS partitions with 'default_permissions', breaking Samba
+ sharing
affects: devicekit → udisks
affects: devicekit-disks (Ubuntu) → udisks (Ubuntu)
Revision history for this message
Serrano Pereira (serrano-pereira) wrote : Re: Mounts NTFS partitions with 'default_permissions', breaking Samba sharing

I'm still having this problem in Ubuntu 10.04 Lucid Lynx. Will this be fixed anytime soon?

summary: - Mounts NTFS partitions with 'default_permissions', breaking Samba
+ Mounts NTFS or FAT partitions with 'default_permissions', breaking Samba
sharing
description: updated
description: updated
Changed in udisks:
importance: Unknown → Medium
Revision history for this message
windily (fengyan1) wrote :

Ubuntu 10.10 also suffer this bug. It can not modify permission on auto mount fat/ntfs USB device.

it there any manual solution?

fstab file:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
#/dev/sdb1
UUID=e4b9d125-e7d3-4b0a-9180-180051afd322 / ext4 errors=remount-ro 0 1
#/dev/sdb3
UUID=e4b9d125-e7d3-4b0a-9180-180051afd322 none swap sw 0 0

mtab file:
/dev/sda1 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
none /dev devtmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
none /var/run tmpfs rw,nosuid,mode=0755 0 0
none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/wind/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=wind 0 0
/dev/sda5 /media/document fuseblk rw,nosuid,nodev,allow_other,blksize=4096,default_permissions 0 0
/dev/sda6 /media/program fuseblk rw,nosuid,nodev,allow_other,blksize=4096,default_permissions 0 0
/dev/sda8 /media/8C7458C17458B026 fuseblk rw,nosuid,nodev,allow_other,blksize=4096,default_permissions 0 0
/dev/sda7 /media/software fuseblk rw,nosuid,nodev,allow_other,blksize=4096,default_permissions 0 0

Changed in udisks:
importance: Medium → Unknown
Changed in udisks:
importance: Unknown → Medium
Revision history for this message
V字龍(Vdragon) (vdragon) wrote :

I am effected too.

In fact, it doesn't appear in Lucid but in Maverick.
I'm a Computer Science student and I put my C source code in NTFS/FAT32 partitions.
I can compile those source code on these drive but I can't execute them by lacking x attribute.
The lately solution is an unmount and a mount adding exec augment...
I believe this affected many people like me!

Revision history for this message
In , Zeuthen (zeuthen) wrote :

udisks is not setting the default_permissions option. I think this is a problem with ntfs-3g or whatever ntfs filesystem driver you are using.

Changed in udisks:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.