Writing to usb stick (lxpolkit issue)

Please post all general support questions for LXDE here.
Locked
Peregrine
Posts: 2
Joined: Wed Jan 02, 2019 2:04 pm

Writing to usb stick (lxpolkit issue)

Post by Peregrine »

I'm having problems with a custom livecd when writing to a usb stick (or any other drive for that matter).
Writing and reading files on the tmpfs (/home) work flawlessly, so the problem is just when writing to other drives (reading them works btw).
Writing to the drives seems to work when I'm superuser (using terminal), but not when I'm a regular user.
We integrated 2 custom files to try and correct it, but it doesn't seem to fix anything:
https://github.com/Sharrisii/TAZ/blob/m ... rage.rules
https://github.com/Sharrisii/TAZ/blob/m ... sbmount.sh
I also sometimes have the error "Error calling StartServiceByName for org.freedesktop.PolicyKit1" on one of my machines.
Also an issue is that when the usb stick is inserted at boot (which is needed to run additional scripts I've put on it, and which are called by the OS on boot), then it stops the boot when the usb stick is being loaded by openRC. Only way on how I can thus boot is without having this stick inserted, and when entering x and I insert it, I can read them (as mentioned earlier).

I read about the files in /usr/share/polkit-1/actions
I have an org.gtk.vfs.file-operations.policy file with following text:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>
  <vendor>GVfs</vendor>
  <vendor_url>http://git.gnome.org/browse/gvfs</vendor_url>
  <action id="org.gtk.vfs.file-operations-helper">
    <description>Perform file operations</description>
    <message>Authentication is required to perform file operations</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/gvfsd-admin</annotate>
  </action>
  <action id="org.gtk.vfs.file-operations">
    <description>Perform file operations</description>
    <message>Authentication is required to perform file operations</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>
</policyconfig>
Can I change this to make things work, or is this but an auto-generated file and thus with every reboot, will the file be renewed anyhow (it is a livecd) ? If so, what's the correct way on how to address this ? Do I use a custom rule as described in https://www.freedesktop.org/software/po ... kit.8.html ?
Last edited by Rex Bouwense on Thu Jan 03, 2019 3:13 pm, edited 1 time in total.
Reason: Inserted code tags
Locked