I have been playing around with chmod, chown, setfacl and special bits trying to get multiple system/full users in same group correct access permissions to my media collection.

But I’ve messed it up somehow and now I’m having weird problems that are hard to track.

I would like to set my whole collection back to the defaults.

What is the best way to do this?

One problem I’ve had when making changes to so many files is the process seems to go forever without completing. Eventually it gets killed so my filesystem has variable attributes throughout. how can this be worked around?

I want everything to be owned by myuser, group media, everything else default I will sort it from there once I have a fresh slate.

And is there a way to backup these attributes only? I don’t have enough storage to backup the files themselves.

It is Debian with ext4 filesystem.

Edit to add: Media collection is on its own separate drive/filesystem; this has no impact on anything else on the computer.

  • layzerjeyt@lemmy.dbzer0.comOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    15 hours ago

    on ext4 usage of ACLs is not even enabled by default

    Is that the case? One reason I included the information is because I found conflicting info and I am unsure. I specifically recall reading it is default on ext4 but not ext3.

    archwiki:

    acl is specified as a default mount option when creating an ext2/3/4 filesystem

    This SE thread has a coment dated 2015:

    Recent distro have ACL mount option included by default (since kernel 2.6). So it’s not mandatory to redefine it in /etc/fstab (or similar). Non exhaustive list of filesystems concerned: ext3, ext4, tmpfs, xfs and zfs .

    I don’t think I have read anywhere it is not default for ext4, only for earlier exts.

    • ReversalHatchery@beehaw.org
      link
      fedilink
      arrow-up
      3
      ·
      14 hours ago

      oh, that’s right, sorry. it must have changed in recent years.

      so I haven’t either found a definitive answer to whether it is a default mount option, but the closest I found is almost it: man mount says to look in man ext4, and there itsays the defaults are determined by the filesystem superblock.

      the superblock’s settings can be viewed with tune2fs -l /dev/your_blockdev, and according to the “default mount options” line I indeed have acl enabled by default on all my ext4 filesystems.

      so in the end, the default is determined by the tool that makes the filesystem. mkfs.ext4 reads them from /etc/mke2fs.conf if not overridden with an argument. on my system tue acl option is right there in this file.

      and that also means that this depends not on your current system, but on the system where the filesystem was created.