Permission denied on a external HDD set it with Password

Hello, I have an external HDD with password used on a old user that i removed to replace it with another one, but now i can’t access it.

Dolphin
Could not enter folder /run/media/user/Toshiba.

Konsole

$ ls -la /run/media/user/Toshiba
ls: cannot open directory '/run/media/user/Toshiba': Permission denied

The HDD with password is it with files inside, it used to works fine with my old user.
I have another HDD without password and immediately accept it to the new user.

/dev/dm-2 ext4 2.7T 1.5T 1.2T 57% /run/media/user/MyDisk

I am at Tumbleweed. Please help me make it accessible. Thank you.

Everything will then be owned by that “old user”. And (s)he might have locked out other users.

You could at least try that ls -la “as root”.

1 Like

Thank you, that’s how it seems as you say.

As a root i access it.

[sudo] password for root: 
tumbleweed:/home/user # ls -la /run/media/user/Toshiba
total 64
drwx------  10 1000 1000  4096 Oct  4 08:20 .
drwxr-x---+  4 root root    80 Mar 30 20:11 ..
drwxr-xr-x  15 1000 1000  4096 Aug 20  2025 files
drwx------   2 root root 16384 Sep 10  2024 lost+found
drwxr-xr-x   3 1000 1000  4096 Feb 18  2025 files
drwxr-xr-x   3 1000 1000  4096 Apr 27  2025 files
drwxr-xr-x  37 1000 1000  4096 Mar 13 10:00 files
drwxr-xr-x   7 1000 1000 20480 Apr 27  2025 files
drwx------   4 1000 1000  4096 Oct  4  2024 .Trash-1000
drwxr-xr-x   4 1000 1000  4096 Mar 13 10:04 files

How can i give rights to the new user?

sudo chown --recursive [you]:users /run/media/user/Toshiba

Probably not users, becausr the GID is above also shown as 1000, thus not defined.

@woozy ,
You should use the username and his promary group for the [you]:[your-group] part of the chown command.

1 Like

Probably not users, because the GID is above also shown as 1000, thus not defined.

@woozy ,
You should use the username and his primary group for the [you]:[your-group] part of the chown command.

Also, take care that /run/media/user/ is only the path to the file system this time. Maybe different another time.

1 Like

Please, can you execute the full command? I’m not clear on this part [you]:[your-group]
You mean sudo chown --recursive user:user /run/media/user/Toshiba

I’m not clear here either, why will it be different another time? I’ll have to execute the same command later, or something is expected to change along the way?

Sorry for the dumb questions.

Issue following command in a terminal:
id $USER

This will show you the exact username and group you need to fill in under [you]:[your-group]

E.g.:

~> id $USER
uid=1000(lapskaus) gid=1000(lapskaus) Gruppen=1000(lapskaus)

The above example will result in:

sudo chown --recursive lapskaus:lapskaus /run/media/user/Toshiba
1 Like

Thanks, this made it working, hcvv wrote it above but i was a little confused.

Last question, I don’t know if any other intervention is expected after this?

Normally not.

Okay, that’s it for now, I call it solved. Thank you all.

I have only one advice. It seems that you do not really understand the concept of ownership and permissions of files and how they work with ownership of processes. That is such a basic concept of Unix/Linus. Try to learn and understand that.

1 Like

Thanks for your advice, you’re completely right, i don’t have such information. Learn is it the right thing to do.