You are not logged in.
Pages: 1
Hello,
I'm having a problem - when I connect USB hard drive formatted as EXT4, it mounts automatically only as read only for normal users.... Only as root I can write to it. I'm using KDE (dolphin), my user is a member of groups: wheel, disk, storage.
When USB key is formatted as NTFS - everything works normally and in default I can write to it.
Could anyone help me? ![]()
Offline
On an ext4 file system the permissions are stored on the filesystem. You need to chown the directory you intend to write to after mounting to the users/groups you intend to have write access to.
Not an Application issue, moving to NC
Last edited by V1del (2020-09-26 12:23:29)
Offline
Thanks for fast reply! For me, it doesn't make sens - why NTFS drive automatically can be mounted as rw, but EXT4 not?
Is there a possibility to set some option as: "automount all drives with rw permissions for normal desktop users"?
Offline
Is it actually mounting read-only, as in the "ro" mount option? If not, re-read wht V1del told you. You're dealing with POSIX permissions, and there's a whole lot of info available about that.
Last edited by Scimmia (2020-09-26 12:35:31)
Offline
It automounts rw only for root user, other users can only read.
Offline
You don't get it. Mount options aren't set per user. If it's mounted rw, it's rw, full stop. Everything else is POSIX permissions (and ACLs/capabilities and other similar things, but that isn't the issue here).
Last edited by Scimmia (2020-09-26 12:42:17)
Offline
Ok, I understand - so how I can set that normal users would be allowed to write by default?
Offline
mount
....
/dev/sda2 on /boot type ext4 (rw,relatime)The rw means mounted rw. That applies to allowed operations on that filesystem and has no connection to users.
You need to chown the directory you intend to write to after mounting to the users/groups you intend to have write access to.
See also man 1 chown.
Last edited by loqs (2020-09-26 12:45:36)
Offline
Ok, I understand - so how I can set that normal users would be allowed to write by default?
You need to chown the directory you intend to write
edit: too slow, by 8 seconds.
Last edited by Trilby (2020-09-26 12:46:07)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I would stick with FAT32 or EXFAT for those USB sticks and cards to use for read/write in any file system. I noticed that EXFAT does not automount, but appears to desktop (xfce), where I can easily mount it right-clicking the mouse. Full rw access for both filesystems. For EXFAT the following package is needed.
pacman -S exfat-utilsAnd to be sure that data truly is written, before ejecting the stick/card, remember command
syncLast edited by euromatlox (2020-09-26 12:51:01)
Offline
mount .... /dev/sda2 on /boot type ext4 (rw,relatime)The rw means mounted rw. That applies to allowed operations on that filesystem and has no connection to users.
V1del wrote:You need to chown the directory you intend to write to after mounting to the users/groups you intend to have write access to.
See also man 1 chown.
Yes, that's correct, but I need to chown every new disk when I connect it first time I assume... I would like to chown automatically every new disk by default to 'storage' group.
Offline
https://wiki.archlinux.org/index.php/Ud … udev_rules
Make some effort to find answers to your own (follow-up) questions. Do not expect to be spoon fed every step of the way.
But also be aware of the side-effects of what you are proposing. If these drives are only for use on the computer you are currently using, this should never have been a problem: you would create them with the permissions you'd want in the first place. Your goal of wanting to automate the chown suggests this is regular enough that you must be getting flash drives from other sources. If you chown to group on your current computer, the content will then not be writable by other systems (unless they have a group with the same gid).
Last edited by Trilby (2020-09-26 12:52:02)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1