You are not logged in.

#1 2020-09-16 13:27:49

asio
Member
Registered: 2020-08-04
Posts: 6

[SOLVED] can't access my ext4 partition

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

#2 2020-09-16 13:38:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] can't access my ext4 partition

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

#3 2020-09-16 13:46:04

asio
Member
Registered: 2020-08-04
Posts: 6

Re: [SOLVED] can't access my ext4 partition

Trilby wrote:

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

#4 2020-09-16 13:52:38

seth
Member
Registered: 2012-09-03
Posts: 49,967

Re: [SOLVED] can't access my ext4 partition

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

Online

#5 2020-09-16 13:54:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] can't access my ext4 partition

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

#6 2020-09-16 14:04:17

seth
Member
Registered: 2012-09-03
Posts: 49,967

Re: [SOLVED] can't access my ext4 partition

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.

Online

#7 2020-09-16 14:07:09

solskog
Member
Registered: 2020-09-05
Posts: 407

Re: [SOLVED] can't access my ext4 partition

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

#8 2020-09-16 14:17:36

seth
Member
Registered: 2012-09-03
Posts: 49,967

Re: [SOLVED] can't access my ext4 partition

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.

Online

#9 2020-09-16 14:21:16

asio
Member
Registered: 2020-08-04
Posts: 6

Re: [SOLVED] can't access my ext4 partition

seth wrote:

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

Trilby wrote:

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

solskog wrote:

not user but users

Oh! that may be it, silly me sad, 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

Board footer

Powered by FluxBB