View previous topic :: View next topic |
Author |
Message |
jyoung Guru
Joined: 20 Mar 2007 Posts: 471
|
Posted: Wed Dec 08, 2021 11:13 pm Post subject: ntfs3g as a regular user |
|
|
I'm trying to mount an ntfs external usb drive as a regular user, and I'm having some trouble:
Code: | Error opening read-only '/dev/sdd1': Permission denied
Failed to mount '/dev/sdd1': Permission denied
Please check '/dev/sdd1' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged
|
ntfs-3g is installed with suid and mount-ntfs enabled. As root, I'm able to mount the device without difficulty. I'm also able to mount the device as a non-root user if, as root, I first chmod a=rwx on the device (in this case, /dev/sdd1). However, when I unplug it and plug it back in, the permissions return to their previous state.
FUSE and NTFS read/write are enabled in the kernel.
There are a lot of threads, including some gentoo threads, relating to this topic, but the majority seem to be cases where it's not possible to mount even as a root. There are a few which suggest modifications to udev rules as a solution, which seems align with the symptoms I'm seeing. However, I'm not very udev fluent, and directly duplicating their solutions has not been fruitful.
The website that's mentioned in the error messsage is also not helpful (at least, as far as I can tell). That link points to the ntfs-3g main page, which makes no mention of unprivileged access, and searching for "unprivileged" on that site returns zero hits.
I would be greatful for any help!
Last edited by jyoung on Thu Dec 09, 2021 1:22 am; edited 1 time in total |
|
Back to top |
|
|
jpp_ Tux's lil' helper
Joined: 23 Oct 2009 Posts: 110 Location: Argentina
|
Posted: Thu Dec 09, 2021 12:27 am Post subject: |
|
|
Hello jyoung
Dont know if this apply to your issue, but i manage to mount ntfs with polkit rules
Code: | /etc/polkit-1/rules.d/10-admin.rules |
Code: | polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks.filesystem-mount-system-internal")) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount")) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat")) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system")) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-unmount-others")) {
return polkit.Result.YES;
}
});
|
|
|
Back to top |
|
|
jyoung Guru
Joined: 20 Mar 2007 Posts: 471
|
Posted: Thu Dec 09, 2021 1:22 am Post subject: |
|
|
juampii, thanks for the suggestion. I just adopted that set of polkit rules, and restarted udev
Code: | /etc/init.d/udev restart |
but alas to no effect. Were you getting a similar error prior to adopting those polkit rules? |
|
Back to top |
|
|
jyoung Guru
Joined: 20 Mar 2007 Posts: 471
|
Posted: Thu Dec 09, 2021 1:31 am Post subject: |
|
|
Wait, would restarting udev even affect polkit? There's no item that looks like polkit /etc/init.d. Hmm... my make.conf file also doesn't have
although polkitd is running in the background. I must admit that I haven't tinkered with polkit. |
|
Back to top |
|
|
jpp_ Tux's lil' helper
Joined: 23 Oct 2009 Posts: 110 Location: Argentina
|
Posted: Thu Dec 09, 2021 2:44 am Post subject: |
|
|
jyoung wrote: | Were you getting a similar error prior to adopting those polkit rules? |
Yes, but im using nemo in a custom de, it uses gvfs i believe, to mount my external ntfs drives.
Also i have emerged ntfs3g with USE="acl mount-ntfs ntfsprogs xattr -debug -ntfsdecrypt -static-libs"
and unset
Code: | CONFIG_NTFS_FS
CONFIG_NTFS3_FS |
and
https://wiki.gentoo.org/wiki/NTFS
But in the wiki says:
Quote: | Important Before Linux v5.15, the mainlined old NTFS kernel driver had very limited functional support for NTFS. The kernel configuration information defines support as "partial, but safe". The old driver could overwrite existing files but is not capable of file or directory creation, deletion, or renaming. Most NTFS users will want to enable the FUSE-powered NTFS-3G implementation for systems running pre-v5.15 kernels. |
So maybe your aproach is better than ntfs3g,.
edit: and for the rules, you need to be in the wheel group
Have a nice day |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|