Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 3573  / 1 Year ago, sat, january 7, 2023, 8:30:48

I've got a "NTFS" partition on my Ubuntu machine which I use it to share files between my Ubuntu and Windows.



The problem is that I'm not able to mount it using my file manager, the error is:




  • Not authorized to perform operation.



So I edited the /etc/fstab file to mount this partition automatically at the boot time. Now, it's mounted however I'm not able to unmount it using my file manager.



/etc/fstab:



UUID=[partition uuid]     /media/d       ntfs-3g       defaults        0       0


What should I do to be able mount and unmount this partition as a normal user from GUI?




  • I'm using "Thunar" as my file manager, and

  • I'm running "OpenBox" on my Ubuntu (It's a minimal installation).


More From » mount

 Answers
2

Make sure you have a "polkit authentication agent" installed and it's running, I use policykit-1-gnome:



sudo apt install policykit-1-gnome


After installing it, add this line:



/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &


to your autostart file:



~/.config/openbox/autostart


Also remove your partition line from /etc/fstab, you don't need it anymore.



Now we should create a rule to allow mounting without requiring password:



sudo nano /etc/polkit-1/localauthority/50-local.d/10-udisks.pkla


And add these:



[udisks2]
Identity=unix-group:sudo
Action=org.freedesktop.udisks2.filesystem-mount-system;
ResultActive=yes


You can change sudo with an other groups like: disk, storage or whatever, I like to use sudo.


[#22523] Sunday, January 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
humbire

Total Points: 55
Total Questions: 93
Total Answers: 113

Location: Oman
Member since Fri, Dec 23, 2022
1 Year ago
humbire questions
Thu, May 13, 21, 02:28, 3 Years ago
Sun, Oct 24, 21, 14:23, 3 Years ago
Wed, May 17, 23, 22:16, 1 Year ago
;