Hi again, sorry if it's a noob question, but I just noticed that I can't mount disk partitions on thunar and pcmanfm-qt, error says "Not authorized to perform operation".
I also tried to test in i3, with the config that worked for arch before, which starts /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 (which I think it's required for this kind of stuff), and indeed I have polkit in the active processes.
ps aux | grep polkit
prova 1380 0.0 1.0 545764 42068 ? Ssl 14:59 0:00 /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
polkitd 1387 0.0 0.2 380324 8112 ? Sl 14:59 0:00 /usr/lib/polkit-1/polkitd --no-debug
prova 6833 0.0 0.0 7460 2176 pts/2 S+ 17:01 0:00 grep --color polkit
Your question lacks much pertinent information.
Hello,
Have you managed the rights on this partition?
Sorry I don't know what you mean by that.
Other (maybe) relevant information:
I have these packages installed
gvfs, thunar-volman, udisks2, polkit, polkit-gnome, polkit-qt6.
Other things I tried:
Mounting in the terminal with "udisktctl -mount -b /dev/sda10" works, it spawns the dialog box asking for password as expected, which does not happen when I click on partitions in file managers. This is happening regardless of the desktop environment I am using (LXQT, XFCE, or just i3).
Check if you have any polkit rules (in /usr/share/polkit-1/rules.d or /etc/polkit-1/rules.d) containing something like the following:
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
or
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
return polkit.Result.YES;
}
});
You need to be a
wheel or
storage member for these to work.
I have these files in /usr/share/polkit-1/rules.d
50-default.rules lightdm.rules org.freedesktop.GeoClue2.rules org.gtk.vfs.file-operations.rules.
The relevant ones seem:
cat 50-default.rules
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
// DO NOT EDIT THIS FILE, it will be overwritten on update
//
// Default rules for polkit
//
// See the polkit(8) man page for more information
// about configuring polkit.
polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
});
cat org.gtk.vfs.file-operations.rules
// Allows users belonging to privileged group to start gvfsd-admin without
// authorization. This prevents redundant password prompt when starting
// gvfsd-admin. The gvfsd-admin causes another password prompt to be shown
// for each client process using the different action id and for the subject
// based on the client process.
polkit.addRule(function(action, subject) {
if ((action.id == "org.gtk.vfs.file-operations-helper") &&
subject.local &&
subject.active &&
subject.isInGroup ("wheel")) {
return polkit.Result.YES;
}
});
I am member of the wheel group
EDIT
I also have this file in the /etc/polkit-1/rules.d/ directory (which normal user has no read permission)
drwxr-x--- 2 root polkitd 4096 14 ago 20.00 /etc/polkit-1/rules.d/
cat 99-artix.rules
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.hibernate" ||
action.id == "org.freedesktop.login1.suspend") {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.upower.hibernate" ||
action.id == "org.freedesktop.upower.suspend") {
return polkit.Result.YES;
}
});
[Edited by a mod: add CODE tags]
Is the partition you're attempting to mount encrypted? Also, please use the CODE tags to enclose your file contents for readability.
No, it's not an encrypted partition
Post ps ax | grep gvfs
ps ax | grep gvfs
1382 ? Sl 0:00 /usr/lib/gvfsd
1390 ? Sl 0:00 /usr/lib/gvfsd-fuse /run/user/1001/gvfs -f
2665 ? Sl 0:00 /usr/lib/gvfs-udisks2-volume-monitor
2677 ? Sl 0:00 /usr/lib/gvfs-mtp-volume-monitor
2683 ? Sl 0:00 /usr/lib/gvfsd-metadata
2688 ? Sl 0:00 /usr/lib/gvfsd-trash --spawner :1.3 /org/gtk/gvfs/exec_spaw/0
2728 pts/0 S+ 0:00 grep --color gvfs
I found out by chance while I was editing my .xinitrc, that if I start the session with dbus-launch like this
exec dbus-launch --sh-syntax --exit-with-session i3
I can mount partitions and I don't have this problem. The same happens in XFCE and LXQt
I am using sddm with the dinit init
Is this a base install? Because a quick testing of our DE ISOs didn't show mounting problems.
interesting. I just solve this problem with fstab. I've had troubles with gvfs becoming a run away process.
No it was an arch install, I switched to artix following this https://wiki.artixlinux.org/Main/Migration
Oh, that's a hard one to crack. It may be .pacnew files which need to be merged or local settings in your $HOME dir. To rule out the latter, create a new test user and see how it goes. Then merge .pacnew config files. Last option, backup your user directory, fresh install, copy back.
I tried with the new user, but that didn't work. It's a minor issue, that I can work around simply starting dbus-launch (in the ls /usr/share/xsessions/ files too). Thanks a lot for the help anyway ;)
what is wrong with just fixing /etc/fstab
UUID=E1D2-8031 /boot/efi vfat umask=0077 0 2
UUID=7f87608b-b782-4b39-89c4-ca8353de7134 / xfs defaults,noatime 0 1
UUID=e07bed3b-dd06-4bda-98d3-2b31a866093f /home/ruben/mnt xfs user,rw,exec,noauto
UUID=ba67ca27-1557-46b2-867f-660bd8579a3a /home/ruben/mnt2 ext4 user,rw,exec,noauto
UUID=1c2481db-93c1-4021-84c1-dafb2670efcb /home/ruben/mnt3 xfs user,rw,exec,noauto