by mitthrowaway2 · 10mo ago · 0 comments
I recently plugged in my external hard drive into my Linux PC and it just wouldn't read it. "You do not have permission to access this drive" or something like that. The solution after googling ended up being (for some reason) some combination of sudo chown -R user /dev/sda1 and unplugging and reconnecting the drive.
No way to do that from the GUI (on KDE at least) and I'm not sure how I'd even solve that problem if I didn't know the super user password.
Still glad to be using Linux, of course, but sometimes these problems still pop up.
Your distro should have been set up so that you can mount USB drives indirectly through the options your DE exposes.
(For that matter, a novice user shouldn't even have to know how their external hard drive is formatted! It might not even be their drive; it could be a family member attempting to share photos with them. If they're just plugging it in for the first time and seeing errors, they'd be pretty hesitant to mess around with the terminal typing in commands they don't understand).
I mean it's hard to tell what really happened. But a different user could have created this files with access rights only for himself on purpose. Something one can do with NTFS on Windows too. It also could have been a distro bug.
> but sometimes these problems still pop up.
I'm a 90% Windows- 9.5% Linux- 0.5% Mac-Admin at day job: Don't tell me Windows has no problems poping up. ;-)
If it requires typing in an admin password to solve, so be it, but at least the UI could lead me to the answer while offering a password prompt.
And yes, I wasn't telling you that Windows has no problems. In fact, Windows probably caused this problem -- this drive worked just fine with Linux the night before; then I transferred some files into it from Windows and plugged it back into my Linux computer and suddenly this happened. I have no doubt that Windows was responsible for messing up the drive state and causing the problem. But to a non-technical user, it's not a question of who is to blame; Windows reads the drive fine whereas Linux gives an error that has no obvious solution. And it can't be solved by right clicking the drive in the explorer and selecting "take ownership and mount" or something like that, it requires using an unfamiliar command into the terminal to fix the problem. And that's basically the case with most file-permission errors that I encounter on Linux systems.
That definitely seems like a feature that could/should be added to some (most? all?) linux file managers. In fact, it doesn't even sound like that difficult to implement with standard system calls[0].
It's not really an issue for me (I prefer the command line -- heck, I still use octal when setting permissions instead of 'rwx'), but it sounds like it bugs you a lot.
You don't mention which Desktop Environment (DE) you're using, but I imagine the file manager in your DE is open source. As such, I'm sure you could make yourself and the (I'm sure) many others who'd like to be able to modify file/dir/filesystem permissions/ownership via their GUI file manager much happier.
Try doing that with Windows Explorer or Finder. I think not.
Good luck!
[0] https://www.tutorialpedia.org/blog/how-to-change-show-permis...
Edit: Clarified prose.
https://i.postimg.cc/VLgkWpy7/image.png
This feature exists since 2022.