<div dir="ltr">Hmm I think you&#39;re missing in what I sent that there are TWO ACE&#39;s for special owner@:<div><span style="color:rgb(80,0,80);font-family:monospace"><span style="background-color:rgb(255,255,0)">special:owner@</span>:rwxc:allow:</span><span style="color:rgb(80,0,80);font-family:monospace">DirInherit</span><br style="color:rgb(80,0,80);font-family:monospace"><span style="color:rgb(80,0,80);font-family:monospace"> (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED</span><br style="color:rgb(80,0,80);font-family:monospace"><span style="font-family:monospace"><font color="#500050"> (-)DELETE    (X)DELETE_CHILD (X)CHOWN        </font><span style="background-color:rgb(255,255,0)"><font color="#38761d">(X)EXEC/SEARCH</font></span><font color="#500050"> (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED</font></span><br style="color:rgb(80,0,80);font-family:monospace"></div><div><span style="color:rgb(80,0,80);font-family:monospace"><br></span></div><div><span style="color:rgb(80,0,80);font-family:monospace"><span style="background-color:rgb(255,255,0)">special:owner@</span>:rw-c:allow:</span><span style="color:rgb(80,0,80);font-family:monospace;background-color:rgb(255,255,0)">FileInherit:InheritOnly</span><br style="color:rgb(80,0,80);font-family:monospace"><span style="color:rgb(80,0,80);font-family:monospace"> (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED</span><br style="color:rgb(80,0,80);font-family:monospace"><span style="font-family:monospace"><font color="#500050"> (-)DELETE    (X)DELETE_CHILD (X)CHOWN        </font><span style="background-color:rgb(255,255,0)"><font color="#ff0000">(-)EXEC/SEARCH</font></span><font color="#500050"> (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED</font></span><br style="color:rgb(80,0,80);font-family:monospace"></div><div><span style="color:rgb(80,0,80);font-family:monospace"><br></span></div>The first one sets up the new DIRECTORIES with exec/SEARCH.<br>The second one sets up the new FILES without EXEC/search.<div><br></div><div>This provides for new files to be made 660 while directories are created 2770.</div><div><div><br></div><div>I think you&#39;re conflating what the POSIX interface does with regards to a umask when a file is created versus what the ACL interface does when a file is created.  In fact the Open man page on Linux specifies that POSIX permissions are (mode &amp; umask) in the ABSENCE of a default ACL.  NFS4 doesn&#39;t have a default ACL but the inheritance is an effective default ACL as it is copying the parent&#39;s ACL and building up from there.</div><div><br></div></div><div>Hope That Helps</div><div><br></div><div>Alec</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 2, 2022 at 3:08 AM Alec &lt;<a href="mailto:anacreo@gmail.com">anacreo@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Taylor,<div>  What I provided would work for your use case 1000%... at the top level you&#39;ll need to add an entry for your process or a group that your process is a member of then it would be able to create files that the members of the sgid group have access to...</div><div><br></div><div><font face="monospace">$ mmgetacl .<br>#NFSv4 ACL<br>#owner:someuser<br>#group:somegroup<br>special:owner@:rwxc:allow:DirInherit<br> (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED<br> (-)DELETE    (X)DELETE_CHILD (X)CHOWN        (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED<br><br>special:owner@:rw-c:allow:FileInherit:InheritOnly<br> (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED<br> (-)DELETE    (X)DELETE_CHILD (X)CHOWN        (-)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED<br><br>special:group@:rwx-:allow:DirInherit<br> (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED<br> (X)DELETE    (X)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED<br><br>special:group@:rw--:allow:FileInherit:InheritOnly<br> (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED<br> (X)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED<br><br>special:everyone@:----:allow:FileInherit:DirInherit<br> (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED<br> (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED</font><br></div><div><font face="monospace"><br></font></div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">user:nongroupuser:rwx-:allow:DirInherit<span style="color:black;background:black"><u></u><u></u></span></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">(X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (-)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED<span style="color:black;background:black"><u></u><u></u></span></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">(-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED</span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;"><br></span></p></div><div><span style="font-family:monospace">You can decide in that last block how much control to give (or not give) on that file.  New files by &quot;nongroupuser&quot; would be owned by nongroupuser, but the group would be the group of the parent directory, not their primary group.</span></div><div><br></div><div>Alec</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 2, 2022 at 2:50 AM Taylor Joshua George (PSI) &lt;<a href="mailto:joshua.taylor@psi.ch" target="_blank">joshua.taylor@psi.ch</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Perhaps I should try and describe my use-case a bit:<br>
<br>
There is a daemon process that gets data and must then write it out<br>
into a project directory in GPFS. The project directory is owned by the<br>
project owner, and has the setgid bit set on the directory. This is so<br>
that members of the group can read/write/etc files put in the<br>
directory. The daemon is not a member of the project group.<br>
<br>
The daemon process used to run as root, however, my goal with ACLs is<br>
to enable it to write into project dirs, without needing to change the<br>
effective UID/GID (or be a member of the group) - so, in this case, it<br>
runs as a regular user. The ACL should allow it to write into the<br>
project directory. Essentially, the ACL is to enable the daemon to run<br>
as a regular user. Once the data is written, the Daemon will (likely)<br>
never access the data again, only the users in the project.<br>
<br>
So, my goal is to have the daemon write files owned by the project<br>
Group (so, with g+rw), as the project users would just use the standard<br>
posix permissions to access the data. I suppose I&#39;m trying to blend the<br>
use of ACLs and standard posix perms. More importantly, I&#39;m trying to<br>
get rid of the execute bit that new files are created with/inherited.<br>
<br>
Answers to questions below...<br>
<br>
<br>
On Fri, 2022-09-02 at 09:23 +0100, Jonathan Buzzard wrote:<br>
&gt; On 01/09/2022 22:18, Taylor Joshua George (PSI) wrote:<br>
&gt; <br>
&gt; &gt; <br>
&gt; &gt; Hi Everyone,<br>
&gt; &gt; I&#39;m trying implement some ACLs, however some of the documentation<br>
&gt; &gt; is a<br>
&gt; &gt; bit unclear to me.<br>
&gt; &gt; <br>
&gt; &gt; Using<br>
&gt;  &gt;<br>
&gt; <a href="https://www.ibm.com/docs/en/spectrum-scale/5.1.4?topic=administration-setting-nfs-v4-access-control-lists" rel="noreferrer" target="_blank">https://www.ibm.com/docs/en/spectrum-scale/5.1.4?topic=administration-setting-nfs-v4-access-control-lists</a><br>
&gt; &gt; as a reference, I&#39;m trying to understand what to use to achieve<br>
&gt; &gt; 0660<br>
&gt; &gt; permissions on files and 2770 on directories.<br>
&gt; &gt; <br>
&gt; <br>
&gt; It&#39;s not clear from this whether you are trying to achieve the <br>
&gt; equivalent of 0660 and 2770 on files and directories or have an ls<br>
&gt; show <br>
&gt; the permissions as 0660 and 2770.<br>
<br>
I&#39;m trying to get the files to be created with 0660 perms (currently,<br>
they are created 0770). I&#39;ve tried playing with the `rwxc` in the first<br>
line of the NFS4 ACL definition, with no luck (it seems to ignore that,<br>
except for error checking). E.g. I&#39;ve tried removing the `x`, which<br>
passes the syntax check but doesn&#39;t seem to change anything.<br>
<br>
so, daemon uses ACLs to write/create files, users use posix perms to<br>
access/modify those files.<br>
<br>
&gt; <br>
&gt; &gt; So far, I&#39;ve managed to achieve 0000 perms, but user with the ACL<br>
&gt; &gt; permission can chmod, or 0770 perms.<br>
&gt; &gt; <br>
&gt; <br>
&gt; Basically neither of the above two options is possible because there<br>
&gt; is <br>
&gt; no exact mapping between POSIX permissions and NFSv4 ACL&#39;s.<br>
&gt; <br>
&gt; For example you can&#39;t get the equivalent of the set group id<br>
&gt; permission. <br>
&gt; You can however put an inheritable ACL for a group on the directory<br>
&gt; that <br>
&gt; gives r/w plus say search directory and possibly execute permissions<br>
&gt; if <br>
&gt; you want those as well.<br>
&gt; <br>
&gt; A user with ACL permissions can change permissions that is completely<br>
&gt; expected. Note that traditional 2770 permissions are only suggestive,<br>
&gt; the file or member of the group would be able to change them to <br>
&gt; something else. In fact programs often do when you save, and Samba<br>
&gt; just <br>
&gt; completely ignores them for the most part. At least with NFSv4 ACL&#39;s<br>
&gt; you <br>
&gt; can remove the ACL permission :-)<br>
&gt; <br>
&gt; How permissions display on an ls/stat is not an exact mapping and<br>
&gt; will <br>
&gt; tend to go to something like 0000, but actual ability to access etc.<br>
&gt; the <br>
&gt; file will be based on the ACL not what you see in ls/stat.<br>
&gt; &gt; Attached is a txt file with the mmgetacl output, as well as file<br>
&gt; &gt; listing on a test file, and finally, the ACL definition I used.<br>
&gt; &gt; <br>
&gt; &gt; As one can see in the attachment, the ACL requested appears<br>
&gt; &gt; differently<br>
&gt; &gt; for what it _actually_ applied.<br>
&gt; &gt; <br>
&gt; <br>
&gt; What ACL schematics does the file system have? Is it NFSv4 or both?<br>
&gt; <br>
<br>
It&#39;s pure NFSv4<br>
-D       nfs4       File locking semantics in effect<br>
-k       nfs4       ACL semantics in effect<br>
<br>
&gt; <br>
&gt; If you are wedded to POSIX style permissions perhaps change to POSIX<br>
&gt; ACL <br>
&gt; schematics on the file system?<br>
<br>
I confess, I was hoping to mix the perms so as not to change our<br>
processes too much. (we currently use reg. posix perms to enable group<br>
writes [via sgid])<br>
<br>
&gt; <br>
&gt; <br>
&gt; JAB.<br>
&gt; <br>
<br>
-- <br>
Joshua Taylor<br>
<br>
---<br>
Paul Scherrer Institut<br>
System Engineer<br>
Science IT Infrastructure and Services department (AWI)<br>
WHGA/038<br>
Forschungstrasse 111<br>
5232 Villigen PSI<br>
Switzerlandd<br>
+41 56 310 52 50<br>
_______________________________________________<br>
gpfsug-discuss mailing list<br>
gpfsug-discuss at <a href="http://gpfsug.org" rel="noreferrer" target="_blank">gpfsug.org</a><br>
<a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss_gpfsug.org" rel="noreferrer" target="_blank">http://gpfsug.org/mailman/listinfo/gpfsug-discuss_gpfsug.org</a><br>
</blockquote></div>
</blockquote></div>