Bug 466609

Summary: KDE Partition Manager: Permissions=everyone should set subdirectory ACLs
Product: [Applications] partitionmanager Reporter: kolAflash <kolAflash>
Component: generalAssignee: Andrius Štikonas <andrius>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 22.12.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description kolAflash 2023-02-28 16:19:34 UTC
I'm assuming that the setting Permissions=everyone when formatting an ext2/ext3/ext4/btrfs/f2fs partition is mostly for use as removable storage (e.g. USB thumb drives).

I like this option very much!!!
ext4 and most of the other Linux filesystems are great for removable storage because of their journal feature. (ex)FAT doesn't have a journal and NTFS implementation on Linux is still in a bad state. So in pure Linux environments for example ext4 is ideal for USB thumb drives.

Permissions=everyone is currently just a "chmod 777 /mountpoint". One problem with that is, that users can't create files in subdirectories created on another computer with a different UID. But there's an easy solution to that. Simply set ACL permissions, so subdirectories adopt to the 777 permission from it's parent folder.

# -R to make an already created "lost+found" directory accessible.
chmod -R 777 /mnt/
setfacl -R -m d:u::rwx,d:g::rwx,d:o::rwx /mnt/



For this to work the filesystem must be mounted with the option acl.
(for initially setting the ACLs and for later use too)
On most modern systems this seems to work by default. But in some scenarios it might be needed to manually set acl as preferred mount option in the filesystem metadata (if the filesystem offers this).

ext4: tune2fs -o acl /dev/sdX1
(alternatively use mkfs.ext4 -O acl directly)



SOFTWARE/OS VERSIONS
https://files.kde.org/neon/images/testing/20230214-0250/neon-testing-20230214-0250.iso
KDE Partition Manager 22.12.2



See also:
- https://unix.stackexchange.com/questions/422656/how-to-make-an-ext4-formatted-usb-drive-with-full-rw-permissions-for-any-linux-m/422687#422687
- https://opensource.com/article/20/3/external-drives-linux