tuxera/ntfs-3g

REGRESSION : mount option users no more working since Ubuntu 22.04

CoSoCo opened this issue · 4 comments

CoSoCo commented

The entry in /etc/fstab

UUID=2510AA16624BB80C /media/Sicherung ntfs defaults,noauto,users,windows_names,hide_dot_files 0 0

I get the following error message:

$ mount /media/Sicherung/
Error opening read-only '/dev/sda7': Keine Berechtigung
Failed to mount '/dev/sda7': Keine Berechtigung
Please check '/dev/sda7' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
https://github.com/tuxera/ntfs-3g/wiki/NTFS-3G-FAQ

With mouse click in file manager I get in graphical dialogue:

Error mounting system-managed device /dev/sda7: Unknown error when mounting /media/Sicherung

This was working fine with Ubuntu 20.04.

This seems like an issue with permissions, and thus a bug that should be filed against Ubuntu. Surely adding 'sudo' to the mount command makes it work again?

CoSoCo commented

... Surely adding 'sudo' to the mount command makes it work again?
Yes of coarse, but this causes interpretation of ownership root, which I don't want, and it doesn't help for mounting from file manager.

Ok, then it's definitely an issue to be filed with Ubuntu, not us. The management of rights by the system is a distribution configuration issue. In this case they probably have removed the setuid bit from ntfs-3g whereas it used to be there before and this is probably a deliberate change to increase security, but you'd have to ask the Ubuntu maintainers about this.
When clicking something in the GUI to mount a volume you should typically be presented with a dialog asking for sudo credentials and if this doesn't happen then it is a bug in the file manager or a component that the file manager relies on, e.g. udisks or whichever component handles mounting in this file manager.

Hi,
I worry about, if NTFS-3G was updated to the new rules for mount, version > util-linux 2.35 on Ubuntu 22.04.
The current version: ntfs-3g 2021.8.22 integrated FUSE 28
The new rule (see: man mount):
Since util-linux 2.35, mount does not exit when user permissions are inadequate according
to libmount’s internal security rules. Instead, it drops suid permissions and continues as
regular non-root user. This behavior supports use-cases where root permissions are not
necessary (e.g., fuse filesystems, user namespaces, etc).

It appears, that NTFS-3G does not properly work with the mount options user and users.

Can You please examine, if my suspicion is correct or not.

See also: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/2055226