Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834042 - sys-fs/ntfs3g: cannot mount as regular user
Summary: sys-fs/ntfs3g: cannot mount as regular user
Status: RESOLVED DUPLICATE of bug 822024
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-25 17:49 UTC by Davyd McColl
Modified: 2022-02-25 21:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davyd McColl 2022-02-25 17:49:21 UTC
When attempting to mount a mountpoint specified in my fstab with the following options:

UUID=40666DD7666DCE6A			  /mnt/haynes	  ntfs-3g    defaults,noatime,nodiratime,users,noauto  0 2


I get the response:
Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged


Personally, I don't mind having to elevate something if there's a good reason, however, according
to `equery u ntfs3g`, there's no way for me to satisfy the above requirements:

❯ equery u ntfs3g
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sys-fs/ntfs3g-2021.8.22:
 U I
 + + acl         : Add support for Access Control Lists
 - - debug       : Enable extra debug codepaths, like asserts and extra output. If you want to get
                   meaningful backtraces see
                   https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + mount-ntfs  : Install mount.ntfs symlink 
 - - ntfsdecrypt : Build and install the ntfsdecrypt application. 
 + + ntfsprogs   : Enable ntfsprogs 
 - - static-libs : Build static versions of dynamic libraries as well
 + + xattr       : Add support for extended attributes (filesystem-stored metadata)

If I simply chmod +s the ntfs3g binary, I get an error:

Mount is denied because setuid and setgid root ntfs-3g is insecure with the
external FUSE library. Either remove the setuid/setgid bit from the binary
or rebuild NTFS-3G with integrated FUSE support and make it setuid root.
Please see more information at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged

But there's no USE flag to enable internal FUSE, so I'm stuck.

This is a problem for attaching arbitrary ntfs drives which are in my fstab 
(eg: KDE just complains that it can't do it) and it's a problem for my script 
that optimistically attempts to copy data to a drive if it's attached because 
the mount command. I can, however, mount the drive via KDE's methods if I
don't have it in my fstab - but that just means that my script can't do it
easily.

Please allow building with an internal FUSE and setting suid (I'm sure these used
to be USE flags?)

Reproducible: Always

Steps to Reproduce:
1. Install ntfs-3g
2. create fstab entry for an ntfs drive, allowing users to mount
3. attempt to mount & fail to do so
Actual Results:  
Fails to mount

Expected Results:  
Should mount, if ntfs-3g can be compiled with the appropriate flags
Comment 1 Ionen Wolkens gentoo-dev 2022-02-25 17:59:19 UTC
~arch's ntfs3g-2021.8.22-r3 (note -r3) will use internal and has a USE=suid, but hasn't been stabilized yet (may be a bit overdue).
Comment 2 Mike Gilbert gentoo-dev 2022-02-25 18:00:03 UTC
This was fixed in >=sys-fs/ntfs3g-2021.8.22-r1. Please upgrade.

*** This bug has been marked as a duplicate of bug 822024 ***
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-25 18:05:02 UTC
Filed bug 834043 for stabilisation.
Comment 4 Davyd McColl 2022-02-25 21:16:46 UTC
just to double-check:

I have 2021.8.22 installed, but 2021.8.22-r3 is available

Now I'd assume (perhaps incorrectly?) that 2021.8.22-r3 was a release candidate for 2021.8.23, but the response here seems to suggest I should install 2021.8.22-r1+? or do rc version numbers refer to the next release, ie 2021.8.23?

tbh, I just want to be able to mount ntfs volumes without privileges, so whatever works? (:
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-25 21:18:00 UTC
(In reply to Davyd McColl from comment #4)
> just to double-check:
> 
> I have 2021.8.22 installed, but 2021.8.22-r3 is available
> 
> Now I'd assume (perhaps incorrectly?) that 2021.8.22-r3 was a release
> candidate for 2021.8.23, but the response here seems to suggest I should
> install 2021.8.22-r1+? or do rc version numbers refer to the next release,
> ie 2021.8.23?
> 
> tbh, I just want to be able to mount ntfs volumes without privileges, so
> whatever works? (:

-rN is a revision, not an RC :)
Comment 6 Davyd McColl 2022-02-25 21:22:14 UTC
aha! thanks, will try an update (: