You are not logged in.
Pages: 1
when i
cd /run/media/user/label
results
cd: Permission denied: “/run/media/user/label”
what i have tried:
adding the following entry to /etc/fstab
UUID=4568d306-9b8c-4277-a9de-cd01b0bb3a01 /run/media/user/label ext4 defaults,user 0 0
according to fstab(5) and this answer this should make regular users able to access that partition read and write normally, but nothing changed
Last edited by asio (2020-09-16 14:25:45)
Offline
Please post the output of the following:
findmnt /run/media/user/label
ls -ld /run /run/media /run/media/user /run/media/user/label
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Please post the output of the following:
findmnt /run/media/user/label ls -ld /run /run/media /run/media/user /run/media/user/label
Thanks for your replay, here are the outputs
$ findmnt /run/media/user/label
TARGET SOURCE FSTYPE OPTIONS
/run/media/user/label /dev/sda7 ext4 rw,nosuid,nodev,noexec,relatime
$ ls -ld /run /run/media /run/media/user /run/media/user/label
drwxr-xr-x 22 root root 520 Sep 16 14:54 /run/
drwxr-xr-x 3 root root 60 Sep 16 14:54 /run/media/
drwxr-xr-x 4 root root 80 Sep 16 15:09 /run/media/user/
drwx------ 5 999 adm 4096 Sep 16 10:44 /run/media/user/label//
Offline
The mounted path belongs to UID 999 (probably from a different OS), recursively(?) chown it to your UID.
It's not different from eg. /root
Offline
First, it seems that something else is (re)mounting the partition and your fstab options don't appear to be applied - but that is not likely relevant. The problem is simply the permissions on the content as shown in the last line of the output: the root of the filesystem on that device does not allow *any* permission whatsoever except for a user id that is not even in use on your current system.
Do you mount this partition in another OS as well? Or was it created in another OS and now you intend to only / primarily use it in this one? Your usecase will determine the best way forward, but you will have to chmod and potentially chown the root of the filesystem on that device.
Edit: Note that simply chowning it to your user as suggested by Seth will certainly make it "work" in the short term on this system, but if you still use it on another system that would cause problems there. That's why defining how you intend to use this device is important.
Last edited by Trilby (2020-09-16 13:56:22)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Since redhat changed their range 6 years ago, 999 is a system UID pretty much everywhere.
If you intend to, do not harmonize the systems towards 999, but some 1000+ UID.
Offline
not user but users
users,nodev,nosuid,noexec 0 0
man mount
users Allow any user to mount and to unmount the filesystem, even when some other ordinary user mounted it. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).
Last edited by solskog (2020-09-16 14:08:35)
Offline
users ./. user only determines who gets to umount the mount ("users" allows others than the mouting user to umount the mount)
It has no impact on the permissions which for ext4 are entirely controlled by the mounted FS.
Offline
The mounted path belongs to UID 999 (probably from a different OS), recursively(?) chown it to your UID.
It's not different from eg. /root
chown that directory made it work, thanks
Edit: Note that simply chowning it to your user as suggested by Seth will certainly make it "work" in the short term on this system, but if you still use it on another system that would cause problems there. That's why defining how you intend to use this device is important.
Thanks for that note I'm currently willing to use arch only so a simple chown was enough but I definitely keep that in my mind
not user but users
Oh! that may be it, silly me , chown it did it for me. but I should use users in the next time, thanks.
Last edited by asio (2020-09-16 14:22:46)
Offline
Pages: 1