1

Basically I need any file filefoo that is newly created by userfoo or userbar, both members of groupfoo, in /Users/Shared/SpecialDirectory to have the same ownership that would be achieved by that user doing chown whicheverusermadethefile:groupfoo filefoo after the fact.

(Longer story: I have two users running simultaneously on the same machine. The users have a shared folder at /Users/Shared/SpecialDirectory. These users, say userfoo and userbar, are both already members of a group groupfoo. userfoo syncs this directory using Dropbox, but Dropbox can't sync files downloaded by userbar into that directory b/c of permissions. File-by-file or a bunch at a time this problem can be solved with chown and adding the right group ownership to the file or directory, but new downloads or additions continue to pose a problem. Thanks to some old tinkering with umask the files are created with the correct group permissions such that userfoo's Dropbox instance can read and sync them when their ownership is anyuser:groupfoo, but the group itself is wrong because new file ownership defaults to userbar:staff instead of userbar:groupfoo.)

PS: This question is closest to the one I'm asking about, but the suggested solutions don't seem to apply since they don't ensure correct ownership of new files. Also, I could be wrong, but it looks like the questions here, here, and here aren't what I need, because the permissions are correct--it's the ownership that's wrong--and I need the fix to apply to any process creating any file (in particular b/c the bulk of these files-to-be-shared are pdfs downloaded by Chrome). This one also doesn't seem to do it--the directory itself is already owned by userfoo:groupfoo, yet new files created by userbar don't get the groupfoo gid.

  • 2
    I may be misunderstanding your question but does chgrp groupfoo thedirectory; chmod g+s thedirectory not have the desired effect? This sounds like the standard scenario for directories with the setgid bit set. I don't think you need ACLs for this. – Celada Mar 25 '13 at 10:47
  • I think you're right and I'm an idiot and didn't check carefully enough what I had done. I need to wait a bit to ensure that this is right and then I'm going to flag my q or something b/c it would then be a clear dupe of the last link I cite. – Philip Apr 2 '13 at 17:48
  • OK so I realized the issue--I download file bar in ~/downloads and move to /users/shared/specialdirectory but bar doesn't then "inherit" the group newly created files in specialdirectory do. So this is not the question I asked, but it is the issue I meant to address. Any thoughts? – Philip Apr 10 '13 at 5:26

You must log in to answer this question.

Browse other questions tagged .