Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
126 views
What systemd service mounts filesystems in /media/$USER?
I have some mount units that are not always being started. When one of them isn't started, I find that the corresponding device is instead mounted in `/media/${USER}`. What do I need to do to make these mount units launch before whatever mounts filesystems in `/media/${USER}`?
I have some mount units that are not always being started. When one of them isn't started, I find that the corresponding device is instead mounted in /media/${USER}. What do I need to do to make these mount units launch before whatever mounts filesystems in /media/${USER}?
Melab (4328 rep)
Jul 31, 2025, 01:47 AM • Last activity: Jul 31, 2025, 05:09 PM
0 votes
0 answers
108 views
Arch Linux - Unable to mount Windows NTFS Partition using GUI
My PC is running a dual-boot setup. I have two NVMe Drives, running Windows 10 and Arch Linux respectively. I first installed Windows, then Arch. My bootloader is GRUB and is able to boot to both OSs. Both systems function normally. As can be seen from the command ```lsblk```, ```nvme0n1``` contains...
My PC is running a dual-boot setup. I have two NVMe Drives, running Windows 10 and Arch Linux respectively. I first installed Windows, then Arch. My bootloader is GRUB and is able to boot to both OSs. Both systems function normally. As can be seen from the command
,
contains Arch while
contains Windows, where the NTFS partition lies in
.
> sudo lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0  7.3T  0 disk 
├─nvme0n1p1 259:1    0    8G  0 part /efi
└─nvme0n1p2 259:2    0  7.3T  0 part /
nvme1n1     259:3    0  1.9T  0 disk 
├─nvme1n1p1 259:4    0  100M  0 part 
├─nvme1n1p2 259:5    0   16M  0 part 
├─nvme1n1p3 259:6    0  1.9T  0 part 
└─nvme1n1p4 259:7    0  642M  0 part
The NTFS partition is clearly recognized both in GNOME Disks and Nautilus. However attempts to mount it fail. When I try to mount using both GUIs, I get
mounting /dev/nvme1n1p3 at /run/media/linux/(UUID): wrong fs type, bad option, bad superblock on /dev/nvme1n1p3, missing codepage or helper program, or other error (udisks-error-quark, 0)
. However manual mounts work.
> sudo mount --mkdir /dev/nvme1n1p3 /run/media/linux/(UUID)
The command is executed successfully, and I can now access the NTFS partition on the GUI too. It is a minor inconvenience to have to manually mount the drive, and I am curious why the GUI fails even though basically the same command on CLI succeeds.
Hyunbin Yoo (175 rep)
May 30, 2025, 07:03 PM • Last activity: May 30, 2025, 07:12 PM
4 votes
3 answers
3358 views
How to tell systemctl to automatically unmount a drive if it's idle and remove directory after unmounting?
I have this entry in fstab: LABEL=cache /disks/cache ext4 rw,user,x-mount.mkdir,relatime,noauto,errors=remount-ro,x-systemd.idle-timeout=120min 0 0 What I expoect to do is: 1. to mount the disk with the label cache on /disks/cache any time I demand it 2. to create the path /dsisks/cache if it doesn'...
I have this entry in fstab: LABEL=cache /disks/cache ext4 rw,user,x-mount.mkdir,relatime,noauto,errors=remount-ro,x-systemd.idle-timeout=120min 0 0 What I expoect to do is: 1. to mount the disk with the label cache on /disks/cache any time I demand it 2. to create the path /dsisks/cache if it doesn't exist 3. To give +rwx permission to my user or any user in it's deffect 4. to atomatically unmount the disk if it's idle after 1 hour Why step 4 which is isn't working and how to make that the folder be removed after unmounting, is it there a x-umount.rmdir option?
ape1 (51 rep)
Nov 2, 2021, 08:41 PM • Last activity: Jan 6, 2025, 12:02 PM
2 votes
2 answers
226 views
mount options of udisks2 (dmask, fmask) are not applied when mounted with udisksctl (exfat fs)
I have a removable SD Card formatted with **exfat** which I would like to mount with `udisksctl`via the `udisks2` mechanism. What I want to do is to replicate a `noexec` option by using `dmask=0002` and `fmask=0113`. I have the following line in `/etc/udisks2/mount_options.conf`: ```bash exfat_defau...
I have a removable SD Card formatted with **exfat** which I would like to mount with udisksctlvia the udisks2 mechanism. What I want to do is to replicate a noexec option by using dmask=0002 and fmask=0113. I have the following line in /etc/udisks2/mount_options.conf:
exfat_defaults=uid=$UID,gid=$GID,iocharset=utf8,errors=remount-ro,dmask=0002,fmask=0113
When I check with a ls -al, these are not applied. Files have a .rwxr-xr-x (0755) permission and directories have drwxr-xr-x (0755). What do I need to do to make udisks2 accept the configuration file and not ignore it? The options were written according to [the latest storaged.org specifications](http://storaged.org/doc/udisks2-api/latest/mount_options.html) . All existing questions on https://unix.stackexchange.com do not have a solution. I hope that the collective mind now has better knowledge.
emk2203 (838 rep)
Oct 25, 2024, 04:55 PM • Last activity: Oct 26, 2024, 06:06 AM
0 votes
0 answers
38 views
Replicating 'udisks power-off' behavior (without udisks)
`udisks` exists for regular users, root must (and is) able to live without it, I need help figuring out how. The goal is to do exactly what ``` udisks power-off /dev/sdX ``` does without `udisks`. `hdparm` is out of question, as it is assumed that UAS (https://linux-sunxi.org/USB/UAS) is in use and...
udisks exists for regular users, root must (and is) able to live without it, I need help figuring out how. The goal is to do exactly what
udisks power-off /dev/sdX
does without udisks. hdparm is out of question, as it is assumed that UAS (https://linux-sunxi.org/USB/UAS) is in use and ATA pass-through is broken, which is the case for many external drives (i.e. all Seagate enclosures, see https://www.smartmontools.org/wiki/SAT-with-UAS-Linux) . To physically stop the drive from spinning I have successfully employed
scsi_stop /dev/sdX
which is a part of the sg3-utils (Debian and derivatives) package. Then, to remove the drive from the system, I used
echo 1 > /sys/block/sdX/device/delete
These two steps do most of, but not all the work. The block device itself is removed and is not visible anymore, however, the drive is still visible as a USB device through lsusb, which is not the case with udisks power-off. So how do I finish it?
EmErAJID (26 rep)
Aug 1, 2024, 05:54 PM
3 votes
1 answers
758 views
udisksctl: get loop device and mount point without resorting to parsing localized output?
`udisksctl` is my tool of choice when dealing with file system images ([recent example](https://unix.stackexchange.com/questions/775274/create-fat-formatted-disk-image-that-can-fit-1g-file/775277#775277), but I've been doing this [all over the place](https://unix.stackexchange.com/search?q=user%3A10...
udisksctl is my tool of choice when dealing with file system images ([recent example](https://unix.stackexchange.com/questions/775274/create-fat-formatted-disk-image-that-can-fit-1g-file/775277#775277) , but I've been doing this [all over the place](https://unix.stackexchange.com/search?q=user%3A106650+udisksctl+is%3Aanswer)) . The dance typically looks like
fallocate -l ${img_size} filesystem.img
mkfs.${fs} filesystem.img

# Set up loop device as regular user
loopback=$(udisksctl loop-setup -b "${img_file}" | sed 's/.* \([^ ]*\)\.$/\1/')

# Mount as regular user
mounted=$(udisksctl mount -b "${loopback}" | sed 's/^.* \([^ ]*\)$/\1/')

# Do the testing/benchmarking/file management
# e.g.:
cp -- "${files[@]}" "${mounted}"
Quite frankly, I have a bad feeling about the way I parse the output of udisksctl; these are clearly human-aimed strings: >
> Mapped file filesystem.img as /dev/loop0.
> Mounted /dev/loop1 at /run/media/marcus/E954-81FB
>
And I don't think anyone considers their actual format "API". So, my scripts might break in the future! (Not to mention the nasal demons I invite if the image file name contains line breaks.) udisksctl doesn't seem to have a "porcelain" output option or similar. Is there an existing method that does udisksctl's job of loopback mounting with user privilege through udisks2, with a proper, unambiguous output?
Marcus Müller (47107 rep)
Apr 29, 2024, 05:44 PM • Last activity: Jun 17, 2024, 02:00 AM
0 votes
1 answers
202 views
How to change default automount USB path to /mnt/sdXX?
Default mount path with udisks2, udiskie is /media/XXXXX On some distributions /media/user/XXXXXX How to change automount path for USB drives to a shorter /mnt/sdb1 /mnt/sdc2 etc. With udisks2, udiskie, or any other program? autofs, usbmount, tinymount, uam
Default mount path with udisks2, udiskie is /media/XXXXX On some distributions /media/user/XXXXXX How to change automount path for USB drives to a shorter /mnt/sdb1 /mnt/sdc2 etc. With udisks2, udiskie, or any other program? autofs, usbmount, tinymount, uam
YukaMax (1 rep)
Mar 18, 2024, 09:18 PM • Last activity: Mar 19, 2024, 09:36 AM
0 votes
0 answers
85 views
Hide docker mounts from udisks / file explorer
Recently, I moved my docker data from ``/var/lib/docker`` to the home directory: ``/home/me/data/docker``. Since then, I see mounted storages in my file explorer (Nemo). [![][1]][1] I've tried to google for ``udisks`` rules to hide these mounts but without success. Could you help, please? P.S. I see...
Recently, I moved my docker data from `/var/lib/docker to the home directory: /home/me/data/docker`. Since then, I see mounted storages in my file explorer (Nemo). Image I've tried to google for `udisks` rules to hide these mounts but without success. Could you help, please? P.S. I see one unanswered question , info from there didn't help, too.
dbzix (131 rep)
Oct 28, 2023, 09:25 PM
1 votes
0 answers
374 views
How to modify/extend USB device access permissions in Debian?
I have a PC with Debian 10. I need the USB drives to have broader permissions than those given by default by the system. I will give an example: with the user "john" being authenticated, when a USB memory is detected, the directory "/media/john/" is created with root as the owner and drwxr-x---+ per...
I have a PC with Debian 10. I need the USB drives to have broader permissions than those given by default by the system. I will give an example: with the user "john" being authenticated, when a USB memory is detected, the directory "/media/john/" is created with root as the owner and drwxr-x---+ permissions. User "john" gains access to that directory via ACL: "user:john:r-x". john@debian:~$ getfacl /media/john/ # file: media/john/ # owner: root # group: root user::rwx user:john:r-x group::--- mask::r-x other::--- I need that when the aforementioned directory is created, the same permissions are also given to the group "john", so that another user who has "john" among his groups also has access. Similarly, when the subdirectory is created, whose name is equivalent to the device label, "/media/john/kingston/", it must also have full permissions for the group, by default it is done with rwxr-xr-x and I require it to be drwxrwxr-x. In other words, user must be able to access other user's data on the USB stick by allowing mount options that give full access to the primary group of user "john" ("john" in this example). One of the many things I've tried and it didn't work: edit /etc/udisks2/udisks2.conf (also /etc/udisks2/mount_options.conf) [Storage] Options=relatime DefaultMountOptions=rw DefaultMountOptions=umask=0002 DefaultMountOptions=fmask=0002 DefaultMountOptions=dmask=0002 Another options tested: vfat_allow=umask0002,dmask=0002,fmask=0002 vfat_allow=dmask=0002,fmask=0002 Finally, I have tried modifying the mounting options from UDEV. SUBSYSTEM!=="usb", GOTO="udisks_mount_options_end" KERNEL!=="sd[a-z]*", GOTO="udisks_mount_options_end" # USB ENV{ID_FS_USAGE}=="filesystem", \ ENV{UDISKS_FILESYSTEM_SHARED}="1", ENV{UDISKS_MOUNT_OPTIONS_DEFAULTS}="rw,nosuid,nodev,relatime" # VFAT ENV{ID_FS_USAGE}=="filesystem", ENV{ID_FS_TYPE}=="vfat", \ ENV{UDISKS_MOUNT_OPTIONS_VFAT_DEFAULTS}="uid=$UID,gid=$GID,shortname=mixed,utf8=0,showexec,flush,umask=0002,dmask=0002,fmask=0002", \ ENV{UDISKS_MOUNT_OPTIONS_VFAT_ALLOW}="uid=$UID,gid=$GID,codepage=437,iocharset=ascii,shortname,showexec,utf8,umask,dmask,fmask" # GOTO LABEL="udisks_mount_options_end" In the log it seems that it works... E: UDISKS_FILESYSTEM_SHARED=1 E: UDISKS_MOUNT_OPTIONS_DEFAULTS=rw,nosuid,nodev,relatime E: UDISKS_MOUNT_OPTIONS_VFAT_DEFAULTS=uid=$UID,gid=$GID,shortname=mixed,utf8=0,showexec,flush,umask=0002,dmask=0002,fmask=0002 E: UDISKS_MOUNT_OPTIONS_VFAT_ALLOW=uid=$UID,gid=$GID,codepage=437,iocharset=ascii,shortname,showexec,utf8,umask,dmask,fmask ...but in reality it does not. The group "john" still does not have write permission. $ ls -l /media/ total 28 lrwxrwxrwx 1 root root 6 oct 2 20:59 cdrom -> cdrom0 drwxr-xr-x 2 root root 4096 oct 2 20:06 cdrom0 drwxr-xr-x 2 root root 4096 oct 2 20:06 cdrom1 drwxr-xr-x 3 john john 16384 dic 31 1969 KINGSTON For days I have been finding out and testing solutions that involve udev, polkit or udisks, without success. I really need help!!
Gustavo (71 rep)
Sep 29, 2023, 07:39 PM • Last activity: Oct 3, 2023, 06:58 PM
0 votes
1 answers
1245 views
udisksctl command (udisks package) does not work on NixOS after upgrade to 22.11
What I get when trying to mount an external drive: ```text $ udisksctl mount --block-device /dev/sdb1 The program 'udisksctl' is not in your PATH. You can make it available in an ephemeral shell by typing: nix-shell -p udisks ```
What I get when trying to mount an external drive:
$ udisksctl mount --block-device /dev/sdb1

The program 'udisksctl' is not in your PATH. You can make it available in an
ephemeral shell by typing:
  nix-shell -p udisks
toraritte (1202 rep)
Jun 12, 2023, 01:32 PM
3 votes
1 answers
8223 views
Why is NTFS has a dirty mark and why can't NTFS3 mount dirty NTFS partitions?
https://wiki.archlinux.org/title/NTFS#Unable_to_mount_with_ntfs3_with_partition_marked_dirty When a NTFS partition is marked dirty, NTFS3 cannot mount this on linux But NTFS-3G (and also Windows) can It seems that hot-unplugging an NTFS drive (unplugging it without "ejecting" it, then putting it in...
https://wiki.archlinux.org/title/NTFS#Unable_to_mount_with_ntfs3_with_partition_marked_dirty When a NTFS partition is marked dirty, NTFS3 cannot mount this on linux But NTFS-3G (and also Windows) can It seems that hot-unplugging an NTFS drive (unplugging it without "ejecting" it, then putting it in again) can cause the NTFS partition to be marked as dirty, like [this](https://unix.stackexchange.com/questions/230181/why-does-linux-mark-fat-as-dirty-simply-due-to-mounting-it) . Theoretically, this should not cause any problems, as nowadays many devices support hot (un)plug.
Firestar-Reimu (181 rep)
Jun 10, 2023, 01:57 AM • Last activity: Jun 10, 2023, 09:25 AM
1 votes
1 answers
3287 views
Change default mount point for udisks
KDE Plasma on Arch Linux mounts removable devices to `/run/media/[user]/*` by default, but, as I had an Ubuntu derivative before, I need it to be mounted to `/media/[user]` because of the symlinks and file paths on that removable device. How do I change that mount point?
KDE Plasma on Arch Linux mounts removable devices to /run/media/[user]/* by default, but, as I had an Ubuntu derivative before, I need it to be mounted to /media/[user] because of the symlinks and file paths on that removable device. How do I change that mount point?
itslayer (173 rep)
Sep 22, 2020, 01:07 PM • Last activity: Apr 3, 2023, 10:48 PM
3 votes
0 answers
908 views
Udiskie: org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain
I'm trying to run `udiskie` and `udisks2`'s `udisksctl` to mount an SD card without root privileges. System is Debian, CL-only, headless: $ udiskie-mount /dev/mmcblk0p1 --verbose DEBUG [2023-04-04 00:35:15,374] udiskie.config: Failed to read config file: [Errno 2] No such file or directory: '/home/p...
I'm trying to run udiskie and udisks2's udisksctl to mount an SD card without root privileges. System is Debian, CL-only, headless: $ udiskie-mount /dev/mmcblk0p1 --verbose DEBUG [2023-04-04 00:35:15,374] udiskie.config: Failed to read config file: [Errno 2] No such file or directory: '/home/pi/.config/udiskie/config.yml' DEBUG [2023-04-04 00:35:15,386] udiskie.config: Failed to read config file: [Errno 2] No such file or directory: '/home/pi/.config/udiskie/config.json' DEBUG [2023-04-04 00:35:15,411] udiskie.udisks2: Daemon version: 2.9.2 DEBUG [2023-04-04 00:35:15,412] udiskie.udisks2: Keyfile support: True DEBUG [2023-04-04 00:35:15,683] udiskie.config: new rule: {symlinks=/dev/mapper/docker-*} -> {ignore} DEBUG [2023-04-04 00:35:15,683] udiskie.config: new rule: {symlinks=/dev/disk/by-id/dm-name-docker-*} -> {ignore} DEBUG [2023-04-04 00:35:15,684] udiskie.config: new rule: {is_loop, !is_ignored, loop_file=/*} -> {!ignore} DEBUG [2023-04-04 00:35:15,684] udiskie.config: new rule: {!is_block} -> {ignore} DEBUG [2023-04-04 00:35:15,685] udiskie.config: new rule: {!is_external, is_toplevel} -> {ignore} DEBUG [2023-04-04 00:35:15,685] udiskie.config: new rule: {is_ignored} -> {ignore} DEBUG [2023-04-04 00:35:15,693] udiskie.udisks2: found device owning "/dev/mmcblk0p1": "/org/freedesktop/UDisks2/block_devices/mmcblk0p1" DEBUG [2023-04-04 00:35:15,696] udiskie.mount: mounting /org/freedesktop/UDisks2/block_devices/mmcblk0p1 with {'options': None} ERROR [2023-04-04 00:35:15,757] udiskie.mount: failed to mount /org/freedesktop/UDisks2/block_devices/mmcblk0p1: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not authorized to perform operation DEBUG [2023-04-04 00:35:15,759] udiskie.mount: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/udiskie/mount.py", line 27, in wrapper return await fn(self, device, *args, **kwargs) File "/usr/lib/python3/dist-packages/udiskie/mount.py", line 165, in mount mount_path = await device.mount(**kwargs) File "/usr/lib/python3/dist-packages/udiskie/dbus.py", line 183, in call result = await proxy.call(method_name, signature, *args) File "/usr/lib/python3/dist-packages/udiskie/dbus.py", line 49, in call value = proxy.call_finish(result) gi.repository.GLib.GError: g-io-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not authorized to perform operation (36) According to their docs, I need to have some polkit stuff: https://github.com/coldfix/udiskie/wiki/Permissions So I created that file: $ cat /etc/polkit-1/rules.d/50-udiskie.rules polkit.addRule(function(action, subject) { var YES = polkit.Result.YES; var permission = { // required for udisks1: "org.freedesktop.udisks.filesystem-mount": YES, "org.freedesktop.udisks.luks-unlock": YES, "org.freedesktop.udisks.drive-eject": YES, "org.freedesktop.udisks.drive-detach": YES, // required for udisks2: "org.freedesktop.udisks2.filesystem-mount": YES, "org.freedesktop.udisks2.encrypted-unlock": YES, "org.freedesktop.udisks2.eject-media": YES, "org.freedesktop.udisks2.power-off-drive": YES, // required for udisks2 if using udiskie from another seat (e.g. systemd): "org.freedesktop.udisks2.filesystem-mount-other-seat": YES, "org.freedesktop.udisks2.filesystem-unmount-others": YES, "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES, "org.freedesktop.udisks2.encrypted-unlock-system": YES, "org.freedesktop.udisks2.eject-media-other-seat": YES, "org.freedesktop.udisks2.power-off-drive-other-seat": YES }; if (subject.isInGroup("plugdev")) { return permission[action.id]; } }); I'm in plugdev: $ groups pi adm dialout cdrom sudo audio dip video plugdev staff systemd-journal bluetooth netdev pulse-access Why I got this NotAuthorizedCanObtain error, and how can I fix this?
Daniel (358 rep)
Apr 3, 2023, 08:41 PM
2 votes
1 answers
1195 views
Allow udisksctl loop-setup without authentication for specific users
I have some tests that verify the behavior of a program under conditions where it runs out of disk space. Previously I've used `dd` to create a small-ish file then `mkfs` to make a filesystem on it, then used `sudo losetup` to mount it as a loopback device, then run my test (note, `/dev/full` is not...
I have some tests that verify the behavior of a program under conditions where it runs out of disk space. Previously I've used dd to create a small-ish file then mkfs to make a filesystem on it, then used sudo losetup to mount it as a loopback device, then run my test (note, /dev/full is not appropriate here: the test makes lots of files in a directory and it needs to start with space, then run out). But now I'm moving into a CI/CD environment where I don't have any sudo access for the account that will be running the tests so I need an alternative. I discovered udisksctl with loop-setup which works great on my system, but when I run it on the CI/CD systems I still get authorization errors: reading more closely it requires the user to be logged in, so a remote service doesn't appear sufficient. While I can't get full sudo access I could probably install a polkit exception to allow this account to manage loopback devices. I see /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy with various sections on managing loopback and I've read a number of SO questions that just say edit this file and allow any, which is probably not great. I've not been able to suss out exactly what to do here, is there some way to add a new file into /etc/polkit-1/localuthority somewhere for example that will allow me to specify that a specific user can manage loopback devices without sudo, without a login session (coming in over SSH, for example, or, in this case, invoked from a systemd service with a User= setting)? Or is this method of testing this situation just too complicated and there's something else people would recommend that would be simpler?
MadScientist (3218 rep)
Jun 17, 2022, 10:17 PM • Last activity: Mar 12, 2023, 09:07 AM
0 votes
1 answers
157 views
btrfs mount with compress fails with udisksctl but succeeds with mount?
$ sudo mkfs.btrfs -fL borgbackups /dev/vgxubuntu/borgbackups $ udisksctl mount -o compress=ztsd:15 -b /dev/mapper/vgxubuntu-borgbackups Error mounting /dev/dm-3: GDBus.Error:org.freedesktop.UDisks2.Error.OptionNotPermitted: Mount option `compress=ztsd:15' is not allowed But then: $ sudo mount -o com...
$ sudo mkfs.btrfs -fL borgbackups /dev/vgxubuntu/borgbackups $ udisksctl mount -o compress=ztsd:15 -b /dev/mapper/vgxubuntu-borgbackups Error mounting /dev/dm-3: GDBus.Error:org.freedesktop.UDisks2.Error.OptionNotPermitted: Mount option `compress=ztsd:15' is not allowed But then: $ sudo mount -o compress=zstd:15 /dev/mapper/vgxubuntu-borgbackups /mnt/sd succeeds: $ mount | grep borgback /dev/mapper/vgxubuntu-borgbackups on /mnt/sd type btrfs (rw,relatime,compress=zstd:15,ssd,space_cache,subvolid=5,subvol=/) What am I missing here?
eugenevd (156 rep)
Feb 10, 2023, 05:08 PM • Last activity: Feb 10, 2023, 05:28 PM
2 votes
1 answers
766 views
udisks excluding system global mount options when mounting
I have updated my embedded linux, but the `udisksctl` does not work as expected anymore. If I try to mount a ext4 formatted flash drive I get the following error: root@system:~# udisksctl mount -b /dev/sda1 Error mounting /dev/sda1: GDBus.Error:org.freedesktop.UDisks2.Error.OptionNotPermitted: Mount...
I have updated my embedded linux, but the udisksctl does not work as expected anymore. If I try to mount a ext4 formatted flash drive I get the following error: root@system:~# udisksctl mount -b /dev/sda1 Error mounting /dev/sda1: GDBus.Error:org.freedesktop.UDisks2.Error.OptionNotPermitted: Mount option `errors=remount-ro' is not allowed I do not know why and how the option errors=remount-ro is being forced! If I try to mount with mount command it works just fine: root@system:~# mount /dev/sda1 /tmp/mydrive My question is, where does udisksctl brings that remount-ro into the play and how can I avoid or exclude that option? I have already looked in fstab and found nothing interesting in there. Where are these options being read by udisks ?
DEKKER (998 rep)
Jan 26, 2023, 01:52 PM • Last activity: Jan 26, 2023, 10:38 PM
0 votes
0 answers
135 views
Automount as another user (not logged)
When I plug a USB Key on my desktop install of a redhat fork, USB is automounted as /run/media/ / . I would like that plugged removable device will be automounted for another logged user (not the current desktop one). Which configuration should I set to do so ? (polkit?, udev?, udisk ?) Thanks for y...
When I plug a USB Key on my desktop install of a redhat fork, USB is automounted as /run/media//. I would like that plugged removable device will be automounted for another logged user (not the current desktop one). Which configuration should I set to do so ? (polkit?, udev?, udisk ?) Thanks for your replies.
SVA522 (11 rep)
Dec 19, 2022, 08:54 AM
1 votes
2 answers
1427 views
polkit rules not recognized raspbian stretch
I'm running a raspbian stretch and I want to grant every member of group user the right to mount and unmount usb-pendrives Therefore I installed: `udisks2` I created a *.rules file `/usr/share/polkit-1/rules.d/50-udisks.rules` with the following content: polkit.addRule(function(action, subject) { va...
I'm running a raspbian stretch and I want to grant every member of group user the right to mount and unmount usb-pendrives Therefore I installed: udisks2 I created a *.rules file /usr/share/polkit-1/rules.d/50-udisks.rules with the following content: polkit.addRule(function(action, subject) { var YES = polkit.Result.YES; var permission = { // only required for udisks1: "org.freedesktop.udisks.filesystem-mount": YES, "org.freedesktop.udisks.filesystem-mount-system-internal": YES, "org.freedesktop.udisks.luks-unlock": YES, "org.freedesktop.udisks.drive-eject": YES, "org.freedesktop.udisks.drive-detach": YES, // only required for udisks2: "org.freedesktop.udisks2.filesystem-mount": YES, "org.freedesktop.udisks2.filesystem-mount-system": YES, "org.freedesktop.udisks2.encrypted-unlock": YES, "org.freedesktop.udisks2.eject-media": YES, "org.freedesktop.udisks2.power-off-drive": YES, // required for udisks2 if using udiskie from another seat (e.g. systemd): "org.freedesktop.udisks2.filesystem-mount-other-seat": YES, "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES, "org.freedesktop.udisks2.eject-media-other-seat": YES, "org.freedesktop.udisks2.power-off-drive-other-seat": YES }; if (subject.isInGroup("users")) { return permission[action.id]; } }); I restarted the polkit service: systemctl restart polkit When issuing: udiskctl mount -b /dev/sda1 a user is still asked to login as root. Any idea what is going wrong?
Hias (61 rep)
Nov 30, 2017, 11:48 AM • Last activity: Dec 18, 2022, 04:36 AM
1 votes
1 answers
1571 views
How to install udisks1 in CentOS 7?
I have several scripts that I need for various tasks with USB devices, but they were written with udisks1 in mind. Porting them over to udisks2 has proven difficult, if not impossible, so I'm wondering how I can go about installing udisks1 on a CentOS 7 system. I know the two programs can coexist wi...
I have several scripts that I need for various tasks with USB devices, but they were written with udisks1 in mind. Porting them over to udisks2 has proven difficult, if not impossible, so I'm wondering how I can go about installing udisks1 on a CentOS 7 system. I know the two programs can coexist without issue, I just have no idea where to find a CentOS 7 package for udisks1. Google was no help, so I'm turning to here.
bomberblue (75 rep)
Mar 17, 2015, 04:33 PM • Last activity: Dec 7, 2022, 05:33 PM
1 votes
0 answers
317 views
udiskctl loop-setup automatically mounts the image without asking
I need to just set up a loop device without automatically mounting the device. I need to mount afterwards because the ISO contains some hidden files. [![terminal commands][1]][1] How do I prevent `udisksctl` from automatically mounting the image/ISO? [1]: https://i.sstatic.net/w7fod.png
I need to just set up a loop device without automatically mounting the device. I need to mount afterwards because the ISO contains some hidden files. terminal commands How do I prevent udisksctl from automatically mounting the image/ISO?
ramaswag (21 rep)
Nov 12, 2022, 02:04 PM • Last activity: Nov 12, 2022, 02:26 PM
Showing page 1 of 20 total questions