-1

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).
2
  • Are you running thunar as root? What if you don't add the mount to fstab; can you then mount/unmount in thunar without running it as root?
    – user12753
    Jun 13, 2017 at 9:44
  • Answer to both questions is no. Problem was related to session doesn't have an authentication agent... it's solved.
    – Ravexina
    Jun 13, 2017 at 9:45

2 Answers 2

0

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.

0

Thunar did not mount the partition at /media/d. Since you have added the line in fstab with defaults option, root performed the activity and hence only root user has the permission to unmount it.

to unmount it, you need to run the below command

sudo umount /media/d
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .