You are not logged in.

#1 2021-08-14 23:47:17

hevin
Member
Registered: 2021-08-14
Posts: 63

fix user permission on thunar usb mount

Hi. When mounting the disk from the user via thunar, drive is not available for rw. The problem is most likely in the rights to the mount point 755 the owner of the root. sudo chown user:user /run/media/user/ -R temporary resolve problem.  how can this be fixed? Where are the settings of the mount options and the mount point like fstab for Thunar Volume \ udiskie?
ls -la /run/media/
итого 0
drwxr-xr-x   3 root root  60 авг 12 01:28 .
drwxr-xr-x  32 root root 780 авг 12 01:26 ..
drwxr-x---+  3 root root  60 авг 14 17:56 user

getfacl /run/media/user/
getfacl: Removing leading '/' from absolute path names
# file: run/media/user/
# owner: root
# group: root
user::rwx
user:user:r-x
group::---
mask::r-x
other::---

ls -la /run/media/user/
итого 16
drwxr-x---+ 3 root root 60 авг 14 17:56 .
drwxr-xr-x  3 root root 60 авг 12 01:28 ..
drwxr-xr-x  1 root root  0 авг 14 16:38 d05a0d08-39a0-4fcd-80be-bb0f62af2c5d

Offline

#2 2021-08-14 23:54:11

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: fix user permission on thunar usb mount

hevin wrote:

Where are the settings of the mount options and the mount point like fstab for Thunar Volume \ udiskie?

In the udiskie config file...
https://man.archlinux.org/man/udiskie.8


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2021-08-15 01:07:28

hevin
Member
Registered: 2021-08-14
Posts: 63

Re: fix user permission on thunar usb mount

udisksd[355]: Mounted /dev/sdb2 at /run/media/user/d05a0d08-39a0-4fcd-80be-bb0f62af2c5d on behalf of uid 1000
exa -aG /etc/udisks2/
mount_options.conf.example  udisks2.conf
Doesn't udiskd create a mount point with the user owner?

Offline

#4 2021-08-15 06:23:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,374

Re: fix user permission on thunar usb mount

The problem is most likely in the rights to the mount point 755 the owner of the root. sudo chown user:user /run/media/user/

Assuming you meant $USER (ie. your user name), the answer is no: the path is supposed to be root:root 750 and elevated to rx for the active $USER (ie. when you've an active session)

Likewise the permissions on the mounted path look ok.
The problem is most likely with the mounted filesystem (you're setting the permissions recursively), so
1. What filesystem is on the mountpoint?
2. What are the permissions for a random file you cannot access there?

Online

#5 2021-08-15 23:24:11

hevin
Member
Registered: 2021-08-14
Posts: 63

Re: fix user permission on thunar usb mount

/dev/sda1 on / type ext4 (rw,relatime,discard,nobarrier,commit=600)

/dev/sdb2 on /run/media/user/d05a0d08-39a0-4fcd-80be-bb0f62af2c5d type btrfs (rw,nosuid,nodev,relatime,space_cache,subvolid=5,subvol=/,uhelper=udisks2)

i recently recreate fs witn mkfs.btrfs -f /dev/sdb2
from regular user i have only read access. i have no file on fs, but when try to create.... permission deny
When i change permissions recursively i also change and permission for mount point directory and now when i remount disk it is rw )

Offline

#6 2021-08-16 05:56:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,374

Re: fix user permission on thunar usb mount

Btrfs handles the permissions inside the mounted filesystem - this has nothing to do with the mount path - you just need to make sure that you've execution rights on every branch of the path (what is the default and has been the case for you)
By default the root node of the FS will be write restricted to the root (just as "stat /")

This has *NOTHING* to do w/ the permissions on the mount path (/run/media/user/) or thunar. It's only about the filesystem you mounted.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB