<html><body><p><font size="2">Hi Kevin,</font><br><br><font size="2">Small script herewith (append.acl.sh <dir>) - appends one group ace (append.acl) to all the files/dirs under <dir>.</font><br><font size="2">You may try it for small directory first to check it's usefulness in your case.</font><br><font size="2">(tried along the same lines as discussed by others - mmgetacl, append then mmputacl).</font><br><br><br><tt><b><font size="2">$ cat append.acl  # add ace as per your setup in this file</font></b></tt><br><tt><font size="2">group:bgroup1:r-x-:allow</font></tt><br><tt><font size="2"> (X)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED</font></tt><br><tt><font size="2"> (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED</font></tt><br><br><tt><b><font size="2">$ cat append.acl.sh</font></b></tt><br><br><tt><font size="2">[[ $# -eq 1 ]] && dir=$1 || { echo "Usage: ./append.acl.sh <dir>"; exit 1; }</font></tt><br><tt><font size="2">appendAclFile="/tmp/append.acl"</font></tt><br><tt><font size="2">newAclFile="/tmp/new.acl"</font></tt><br><br><tt><font size="2">cd $dir</font></tt><br><tt><font size="2">for filename in $(find -follow | grep -v ^.$)</font></tt><br><tt><font size="2">do</font></tt><br><tt><font size="2">  echo "Applying ACL to $filename..."</font></tt><br><tt><font size="2">  mmgetacl -k nfs4 $filename -o $newAclFile</font></tt><br><tt><font size="2">  cat $appendAclFile >> $newAclFile</font></tt><br><tt><font size="2">  mmputacl $filename -i $newAclFile</font></tt><br><tt><font size="2">done</font></tt><br><br><tt><font size="2">rm -f $newAclFile</font></tt><br><br><tt><b><font size="2">$ chmod +x append.acl.sh</font></b></tt><br><br><tt><b><font size="2">$ ./append.acl.sh</font></b></tt><br><tt><font size="2">Usage: ./append.acl.sh <dir></font></tt><br><br><tt><b><font size="2">$ time ./append.acl.sh /ibm/fs1/fset2</font></b></tt><br><tt><font size="2">Applying ACL to ./dir30...</font></tt><br><tt><font size="2">Applying ACL to ./dir30/file10...</font></tt><br><tt><font size="2">Applying ACL to ./dir30/file9...</font></tt><br><tt><font size="2">...</font></tt><br><tt><font size="2">...</font></tt><br><tt><font size="2">$</font></tt><br><br><font size="2">Thanks,</font><br><font size="2">Chetan.</font><br><br><img width="16" height="16" src="cid:1__=EABB0959DFF17DE18f9e8a93df938690918cEAB@" border="0" alt="Inactive hide details for "Nathan Falk" ---03/27/2019 10:37:47 PM---I think I gave an internal link. Try this instead: http://w"><font size="2" color="#424282">"Nathan Falk" ---03/27/2019 10:37:47 PM---I think I gave an internal link. Try this instead: <a href="http://www.ibm.com/support/docview.wss?uid=ibm107">http://www.ibm.com/support/docview.wss?uid=ibm107</a></font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">"Nathan Falk" <nfalk@us.ibm.com></font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">gpfsug main discussion list <gpfsug-discuss@spectrumscale.org></font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">03/27/2019 10:37 PM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">Re: [gpfsug-discuss] Adding to an existing GPFS ACL</font><br><font size="2" color="#5F5F5F">Sent by:        </font><font size="2">gpfsug-discuss-bounces@spectrumscale.org</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><font size="2">I think I gave an internal link. Try this instead:</font><br><u><font color="#0000FF"><br></font></u><a href="http://www.ibm.com/support/docview.wss?uid=ibm10716323"><u><font size="2" color="#0000FF">http://www.ibm.com/support/docview.wss?uid=ibm10716323</font></u></a><br><br><font size="2" face="Arial"><br></font><table border="0" cellspacing="0" cellpadding="0"><tr valign="top"><td width="518" valign="middle"><b><font color="#8F8F8F" face="Arial">Nate Falk</font></b><font size="2" face="Arial"><br>IBM Spectrum Scale Level 2 Support<br>Software Defined Infrastructure, IBM Systems</font></td></tr></table>
<table border="0" cellspacing="0" cellpadding="0"><tr valign="top"><td width="518" colspan="2" valign="middle"><hr width="100%" size="2" align="left"></td></tr>
<tr valign="top"><td width="289"><b><font size="1" color="#4181C0" face="Arial"><br>E-mail:</font></b><a href="mailto:nfalk@us.ibm.com" target="_blank"><u><font size="1" color="#5F5F5F" face="Arial">nfalk@us.ibm.com</font></u></a><b><font size="1" color="#4181C0" face="Arial"><br>Find me on:</font></b><a href="https://www.linkedin.com/in/nathan-falk-078ba5125" target="_blank"><img src="cid:2__=EABB0959DFF17DE18f9e8a93df938690918cEAB@" width="13" height="13" alt="LinkedIn: https://www.linkedin.com/in/nathan-falk-078ba5125" border="0"></a><font size="1" color="#5F5F5F" face="Arial"> </font><a href="https://twitter.com/natefalk922" target="_blank"><img src="cid:3__=EABB0959DFF17DE18f9e8a93df938690918cEAB@" width="13" height="13" alt="Twitter: https://twitter.com/natefalk922" border="0"></a></td><td width="228"><div align="right"><img src="cid:4__=EABB0959DFF17DE18f9e8a93df938690918cEAB@" width="66" height="24" alt="IBM" align="bottom"></div></td></tr></table><br><br><br><font size="2" color="#5F5F5F"><br>From:        </font><font size="2">"Nathan Falk" <nfalk@us.ibm.com></font><font size="2" color="#5F5F5F"><br>To:        </font><font size="2">gpfsug main discussion list <gpfsug-discuss@spectrumscale.org></font><font size="2" color="#5F5F5F"><br>Date:        </font><font size="2">03/27/2019 01:04 PM</font><font size="2" color="#5F5F5F"><br>Subject:        </font><font size="2">Re: [gpfsug-discuss] Adding to an existing GPFS ACL</font><font size="2" color="#5F5F5F"><br>Sent by:        </font><font size="2">gpfsug-discuss-bounces@spectrumscale.org</font><br><hr width="100%" size="2" align="left" noshade><br><br><font size="2"><br>Hello Kevin,<br><br>No, you're not missing something. GPFS doesn't provide a means of recursively modifying ACLs. It's not even all that easy to just modify one ACL for one file (it's either mmeditacl, or mmgetacl > /tmp/acl.txt; vi /tmp/acl.txt; mmputacl -i /tmp/acl.txt).<br><br>I've had a few queries along these lines over the years and decided to publish a little bit of a guide here:</font><u><font color="#0000FF"><br><br></font></u><a href="https://www-prd-trops.events.ibm.com/node/how-recursively-set-nfsv4-acls-gpfs-filesystem"><u><font color="#0000FF">https://www-prd-trops.events.ibm.com/node/how-recursively-set-nfsv4-acls-gpfs-filesystem</font></u></a><font size="2"><br><br>There's a sample script there for the recursive part, but that would still have to be tweaked in your case to append just a single ACE to the existing ACL rather than replace the whole ACL.<br><br>Or as others have noted, export the fileset via NFS and go to an NFS client and use nfs4_setfacl instead.<br><br>Thanks,</font><table border="0" cellspacing="0" cellpadding="0"><tr valign="top"><td width="518" valign="middle"><b><font color="#8F8F8F" face="Arial">Nate Falk</font></b><font size="2" face="Arial"><br>IBM Spectrum Scale Level 2 Support<br>Software Defined Infrastructure, IBM Systems</font></td></tr></table>
<table border="0" cellspacing="0" cellpadding="0"><tr valign="top"><td width="518" colspan="2" valign="middle"><hr width="100%" size="2" align="left"></td></tr>
<tr valign="top"><td width="289"><b><font size="1" color="#4181C0" face="Arial"><br>E-mail:</font></b><a href="mailto:nfalk@us.ibm.com" target="_blank"><u><font size="1" color="#5F5F5F" face="Arial">nfalk@us.ibm.com</font></u></a><b><font size="1" color="#4181C0" face="Arial"><br>Find me on:</font></b><a href="https://www.linkedin.com/in/nathan-falk-078ba5125" target="_blank"><img src="cid:2__=EABB0959DFF17DE18f9e8a93df938690918cEAB@" width="16" height="16" alt="LinkedIn: https://www.linkedin.com/in/nathan-falk-078ba5125" border="0"></a><a href="https://twitter.com/natefalk922" target="_blank"><img src="cid:3__=EABB0959DFF17DE18f9e8a93df938690918cEAB@" width="16" height="16" alt="Twitter: https://twitter.com/natefalk922" border="0"></a></td><td width="227"><div align="right"><img src="cid:4__=EABB0959DFF17DE18f9e8a93df938690918cEAB@" width="66" height="24" alt="IBM" align="bottom"></div></td></tr></table><br><br><br><font size="2" color="#5F5F5F"><br><br>From:        </font><font size="2">"Buterbaugh, Kevin L" <Kevin.Buterbaugh@Vanderbilt.Edu></font><font size="2" color="#5F5F5F"><br>To:        </font><font size="2">gpfsug main discussion list <gpfsug-discuss@spectrumscale.org></font><font size="2" color="#5F5F5F"><br>Date:        </font><font size="2">03/27/2019 12:53 PM</font><font size="2" color="#5F5F5F"><br>Subject:        </font><font size="2">Re: [gpfsug-discuss] Adding to an existing GPFS ACL</font><font size="2" color="#5F5F5F"><br>Sent by:        </font><font size="2">gpfsug-discuss-bounces@spectrumscale.org</font><br><hr width="100%" size="2" align="left" noshade><br><br><br>Hi Jonathan, <br><br>Thanks.  We have done a very similar thing when we’re dealing with a situation where:  1) all files and directories in the fileset are starting out with the same existing ACL, and 2) all need the same modification made to them.<br><br>Unfortunately, in this situation item 2 is true, but item 1 is _not_.  That’s what’s making this one a bit thorny…<br><br>Kevin<br><br>—<br>Kevin Buterbaugh - Senior System Administrator<br>Vanderbilt University - Advanced Computing Center for Research and Education<u><font color="#0000FF"><br></font></u><a href="mailto:Kevin.Buterbaugh@vanderbilt.edu"><u><font color="#0000FF">Kevin.Buterbaugh@vanderbilt.edu</font></u></a>- (615)875-9633<br><br>On Mar 27, 2019, at 11:33 AM, Fosburgh,Jonathan <<a href="mailto:jfosburg@mdanderson.org"><u><font color="#0000FF">jfosburg@mdanderson.org</font></u></a>> wrote:<br><font face="Calibri">I misunderstood you.</font><br><font face="Calibri">Pretty much what we've been doing is maintaining "ACL template" files based on how our filesystem hierarchy is set up.  Basically, fileset foo has a foo.acl file that contains what the ACL is supposed to be.  If we need to change the ACL, we modify that file with the new ACL and then pass it through a simple (and expensive, I'm sure) script.  This wouldn't be necessary if in heritance flowed down on existing files and directories.  If you have CIFS access, you can also use Windows to do this, but it is MUCH slower.</font><p><font color="#2F2F2F" face="Calibri"><br><br>-- <br>Jonathan Fosburgh<br>Principal Application Systems Analyst<br>IT Operations Storage Team<br>The University of Texas MD Anderson Cancer Center<br>(713) 745-9346</font><br><br><hr width="100%" size="2" align="left"><b><font face="Calibri"><br>From:</font></b><font face="Calibri"> </font><a href="mailto:gpfsug-discuss-bounces@spectrumscale.org"><u><font color="#0000FF" face="Calibri">gpfsug-discuss-bounces@spectrumscale.org</font></u></a><font face="Calibri"><</font><a href="mailto:gpfsug-discuss-bounces@spectrumscale.org"><u><font color="#0000FF" face="Calibri">gpfsug-discuss-bounces@spectrumscale.org</font></u></a><font face="Calibri">> on behalf of Buterbaugh, Kevin L <</font><a href="mailto:Kevin.Buterbaugh@Vanderbilt.Edu"><u><font color="#0000FF" face="Calibri">Kevin.Buterbaugh@Vanderbilt.Edu</font></u></a><font face="Calibri">></font><b><font face="Calibri"><br>Sent:</font></b><font face="Calibri"> Wednesday, March 27, 2019 11:19:03 AM</font><b><font face="Calibri"><br>To:</font></b><font face="Calibri"> gpfsug main discussion list</font><b><font face="Calibri"><br>Subject:</font></b><font face="Calibri"> [EXT] Re: [gpfsug-discuss] Adding to an existing GPFS ACL</font><b><font color="#806210"><br><br>WARNING:</font></b>This email originated from outside of MD Anderson. Please validate the sender's email address before clicking on links or attachments as they may not be safe. <br>Hi Jonathan, <br><br>Thanks for the response.  I did look at mmeditacl, but unless I’m missing something it’s interactive (kind of like mmedquota is by default).  If I had only a handful of files / directories to modify that would be fine, but in this case there are thousands of ACL’s that need modifying.<br><br>Am I missing something?  Thanks…<br><br>Kevin<br><br>—<br>Kevin Buterbaugh - Senior System Administrator<br>Vanderbilt University - Advanced Computing Center for Research and Education<u><font color="#0000FF"><br></font></u><a href="mailto:Kevin.Buterbaugh@vanderbilt.edu"><u><font color="#0000FF">Kevin.Buterbaugh@vanderbilt.edu</font></u></a>- (615)875-9633<br><br>On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <<a href="mailto:jfosburg@mdanderson.org"><u><font color="#0000FF">jfosburg@mdanderson.org</font></u></a>> wrote:<br><font face="Calibri">Try mmeditacl.</font><p><font color="#2F2F2F" face="Calibri"><br><br>-- <br>Jonathan Fosburgh<br>Principal Application Systems Analyst<br>IT Operations Storage Team<br>The University of Texas MD Anderson Cancer Center<br>(713) 745-9346</font><br><br><hr width="100%" size="2" align="left"><b><font face="Calibri"><br>From:</font></b><font face="Calibri"> </font><a href="mailto:gpfsug-discuss-bounces@spectrumscale.org"><u><font color="#0000FF" face="Calibri">gpfsug-discuss-bounces@spectrumscale.org</font></u></a><font face="Calibri"><</font><a href="mailto:gpfsug-discuss-bounces@spectrumscale.org"><u><font color="#0000FF" face="Calibri">gpfsug-discuss-bounces@spectrumscale.org</font></u></a><font face="Calibri">> on behalf of Buterbaugh, Kevin L <</font><a href="mailto:Kevin.Buterbaugh@Vanderbilt.Edu"><u><font color="#0000FF" face="Calibri">Kevin.Buterbaugh@Vanderbilt.Edu</font></u></a><font face="Calibri">></font><b><font face="Calibri"><br>Sent:</font></b><font face="Calibri"> Wednesday, March 27, 2019 10:59:17 AM</font><b><font face="Calibri"><br>To:</font></b><font face="Calibri"> gpfsug main discussion list</font><b><font face="Calibri"><br>Subject:</font></b><font face="Calibri"> [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL</font><b><font color="#806210"><br><br>WARNING:</font></b>This email originated from outside of MD Anderson. Please validate the sender's email address before clicking on links or attachments as they may not be safe. <br>Hi All, <br><br>First off, I have very limited experience with GPFS ACL’s, so please forgive me if I’m missing something obvious here.  AFAIK, this is the first time we’ve hit something like this…<br><br>We have a fileset where all the files / directories have GPFS NFSv4 ACL’s set on them.  However, unlike most of our filesets where the same ACL is applied to every file / directory in the share, this one has different ACL’s on different files / directories.  Now we have the need to add to the existing ACL’s … another group needs access.  Unlike regular Unix / Linux ACL’s where setfacl can be used to just add to an ACL (i.e. setfacl -R g:group_name:rwx), I’m not seeing where GPFS has a similar command … i.e. mmputacl seems to expect the _entire_ new ACL to be supplied via either manual entry or an input file.  That’s obviously problematic in this scenario.<br><br>So am I missing something?  Is there an easier solution than writing a script which recurses over the fileset, gets the existing ACL with mmgetacl and outputs that to a file, edits that file to add in the new group, and passes that as input to mmputacl?  That seems very cumbersome and error prone, especially if I’m the one writing the script!<br><br>Thanks…<br><br>Kevin<br>—<br>Kevin Buterbaugh - Senior System Administrator<br>Vanderbilt University - Advanced Computing Center for Research and Education<u><font color="#0000FF"><br></font></u><a href="mailto:Kevin.Buterbaugh@vanderbilt.edu"><u><font color="#0000FF">Kevin.Buterbaugh@vanderbilt.edu</font></u></a>- (615)875-9633<br>The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.
<p><br><br>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at <a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fspectrumscale.org%2F&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C06b6070313d74610e17208d6b2d34b57%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636893017903154298&sdata=ibZ7tYAcaWNVUSXyRI4LFwF5Ys88mm4uh2zbCZcVi9Y%3D&reserved=0"><u><font color="#0000FF">spectrumscale.org</font></u></a><u><font color="#0000FF"><br></font></u><a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C06b6070313d74610e17208d6b2d34b57%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636893017903164307&sdata=fPDCexKWCGIaXSvjMaEz3jiPZOf35fVV%2BfR9t%2FJUhLQ%3D&reserved=0"><u><font color="#0000FF">https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&amp;data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&amp;sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&amp;reserved=0</font></u></a><br>The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.
<p><br><br>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at <a href="http://spectrumscale.org/"><u><font color="#0000FF">spectrumscale.org</font></u></a><u><font color="#0000FF"><br></font></u><a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C06b6070313d74610e17208d6b2d34b57%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636893017903174312&sdata=OX51kSL5fs8CqW9u0y7MK1omYGqkx%2F3K%2Bwvn9iKjFM8%3D&reserved=0"><u><font color="#0000FF">https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&amp;data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C06b6070313d74610e17208d6b2d34b57%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636893017903174312&amp;sdata=OX51kSL5fs8CqW9u0y7MK1omYGqkx%2F3K%2Bwvn9iKjFM8%3D&amp;reserved=0</font></u></a><tt><font size="2"><br><br>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org</font></tt><u><font color="#0000FF"><br></font></u><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss"><tt><u><font size="2" color="#0000FF">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</font></u></tt></a><br><br><br><tt><font size="2"><br>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org</font></tt><u><font color="#0000FF"><br></font></u><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss"><tt><u><font size="2" color="#0000FF">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</font></u></tt></a><br><br><br><tt><font size="2">_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br></font></tt><tt><font size="2"><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a></font></tt><tt><font size="2"><br></font></tt><p><p><BR>
</body></html>