I work on an HPC and often I have to share files with other users. The most approachable solution is to have an external cloud storage and recline back and forth. However there’s some projects that are quite heavy (several TB) and that is unfeasible. We do not have a shared group. The following is the only solution I found which is not to just set al permissions to 777, and I still don’t like it.

Create a directory and set ACL to give access to the selected users. This works fine if the users create new files in there, but it does not work if they copy from somewhere else as default umask is 022. Thus the only appropriate solution is to change default umask to 002, which however affects file creation system wide. The alternative is to change permissions every time you copy something, but you all know very well that is not going to happen.

Does it really have to be such a pain in the ass?

  • ranzispa@mander.xyzOP
    link
    fedilink
    arrow-up
    1
    ·
    3 days ago

    I thought sticky bits were used to allow other users to edit files but not delete them. Do they also allow inheriting the parent directory permissions?

    • linuxguy@piefed.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      I didn’t intend and don’t think the stick bit stuff will or could be a complete solution for you. You’ve got some oddly specific and kinda cruddy restrictions that you’ve got to workaround and when they get that nonsensical one ends up solidly in “cruddy hack” territory.

      From the article:

      group + s (pecial)

      Commonly noted as SGID, this special permission has a couple of functions:

      If set on a file, it allows the file to be executed as the group that owns the file (similar to SUID) If set on a directory, any files created in the directory will have their group ownership set to that of the directory owner

      You could run something like https://pypi.org/project/uploadserver/ in screen or run a cron every minute that just recursively sets the correct permissions.

      • ranzispa@mander.xyzOP
        link
        fedilink
        arrow-up
        3
        ·
        3 days ago

        Wow, that group +s seems exactly what I’m looking for! That actually looks like the clean solution I was looking for. I’ll test it out and report back, I’ll have to wait on Monday for the colleagues to be back in the server, but it seems very promising.

        Thank you very much!