Adding to an existing GPFS ACL
Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633
Try mmeditacl. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [1553012336789_download] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org <gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 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.
Hi Jonathan, 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. Am I missing something? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org<mailto:jfosburg@mdanderson.org>> wrote: Try mmeditacl. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [X] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> <gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org>> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org/> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0
I misunderstood you. 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. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [1553012336789_download] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org <gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 11:19:03 AM To: gpfsug main discussion list Subject: [EXT] Re: [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi Jonathan, 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. Am I missing something? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org<mailto:jfosburg@mdanderson.org>> wrote: Try mmeditacl. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [X] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> <gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org>> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org/> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0 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.
Hi Jonathan, 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. Unfortunately, in this situation item 2 is true, but item 1 is _not_. That’s what’s making this one a bit thorny… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Mar 27, 2019, at 11:33 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org<mailto:jfosburg@mdanderson.org>> wrote: I misunderstood you. 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. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [X] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> <gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org>> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> Sent: Wednesday, March 27, 2019 11:19:03 AM To: gpfsug main discussion list Subject: [EXT] Re: [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi Jonathan, 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. Am I missing something? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org<mailto:jfosburg@mdanderson.org>> wrote: Try mmeditacl. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [X] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> <gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org>> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fspectrumsca...> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0<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> 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org/> 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
This is going to be difficult, regardless of the tool used. And it's made worse by inheritance not flowing automatically to existing files and directories. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [1553012336789_download] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org <gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 11:52:37 AM To: gpfsug main discussion list Subject: [EXT] Re: [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi Jonathan, 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. Unfortunately, in this situation item 2 is true, but item 1 is _not_. That’s what’s making this one a bit thorny… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Mar 27, 2019, at 11:33 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org<mailto:jfosburg@mdanderson.org>> wrote: I misunderstood you. 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. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [X] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> <gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org>> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> Sent: Wednesday, March 27, 2019 11:19:03 AM To: gpfsug main discussion list Subject: [EXT] Re: [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi Jonathan, 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. Am I missing something? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org<mailto:jfosburg@mdanderson.org>> wrote: Try mmeditacl. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [X] ________________________________ From: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> <gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org>> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fspectrumsca...> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0<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> 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org/> 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 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.
Hello Kevin, 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). I've had a few queries along these lines over the years and decided to publish a little bit of a guide here: https://www-prd-trops.events.ibm.com/node/how-recursively-set-nfsv4-acls-gpf... 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. Or as others have noted, export the fileset via NFS and go to an NFS client and use nfs4_setfacl instead. Thanks, Nate Falk IBM Spectrum Scale Level 2 Support Software Defined Infrastructure, IBM Systems E-mail: nfalk@us.ibm.com Find me on: From: "Buterbaugh, Kevin L" <Kevin.Buterbaugh@Vanderbilt.Edu> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/27/2019 12:53 PM Subject: Re: [gpfsug-discuss] Adding to an existing GPFS ACL Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi Jonathan, 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. Unfortunately, in this situation item 2 is true, but item 1 is _not_. That’s what’s making this one a bit thorny… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu - (615)875-9633 On Mar 27, 2019, at 11:33 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org> wrote: I misunderstood you. 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. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 From: gpfsug-discuss-bounces@spectrumscale.org < gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 11:19:03 AM To: gpfsug main discussion list Subject: [EXT] Re: [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi Jonathan, 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. Am I missing something? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu - (615)875-9633 On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org> wrote: Try mmeditacl. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 From: gpfsug-discuss-bounces@spectrumscale.org < gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: 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. Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu - (615)875-9633 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org 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 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
I think I gave an internal link. Try this instead: http://www.ibm.com/support/docview.wss?uid=ibm10716323 Nate Falk IBM Spectrum Scale Level 2 Support Software Defined Infrastructure, IBM Systems E-mail: nfalk@us.ibm.com Find me on: From: "Nathan Falk" <nfalk@us.ibm.com> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/27/2019 01:04 PM Subject: Re: [gpfsug-discuss] Adding to an existing GPFS ACL Sent by: gpfsug-discuss-bounces@spectrumscale.org Hello Kevin, 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). I've had a few queries along these lines over the years and decided to publish a little bit of a guide here: https://www-prd-trops.events.ibm.com/node/how-recursively-set-nfsv4-acls-gpf... 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. Or as others have noted, export the fileset via NFS and go to an NFS client and use nfs4_setfacl instead. Thanks, Nate Falk IBM Spectrum Scale Level 2 Support Software Defined Infrastructure, IBM Systems E-mail:nfalk@us.ibm.com Find me on: From: "Buterbaugh, Kevin L" <Kevin.Buterbaugh@Vanderbilt.Edu> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/27/2019 12:53 PM Subject: Re: [gpfsug-discuss] Adding to an existing GPFS ACL Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi Jonathan, 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. Unfortunately, in this situation item 2 is true, but item 1 is _not_. That’s what’s making this one a bit thorny… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu- (615)875-9633 On Mar 27, 2019, at 11:33 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org> wrote: I misunderstood you. 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. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 From: gpfsug-discuss-bounces@spectrumscale.org< gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 11:19:03 AM To: gpfsug main discussion list Subject: [EXT] Re: [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: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. Hi Jonathan, 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. Am I missing something? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu- (615)875-9633 On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org> wrote: Try mmeditacl. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 From: gpfsug-discuss-bounces@spectrumscale.org< gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: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. Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu- (615)875-9633 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org 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 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
Hi Kevin, Small script herewith (append.acl.sh <dir>) - appends one group ace (append.acl) to all the files/dirs under <dir>. You may try it for small directory first to check it's usefulness in your case. (tried along the same lines as discussed by others - mmgetacl, append then mmputacl). $ cat append.acl # add ace as per your setup in this file group:bgroup1:r-x-:allow (X)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (-)DELETE (-)DELETE_CHILD (-)CHOWN (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED $ cat append.acl.sh [[ $# -eq 1 ]] && dir=$1 || { echo "Usage: ./append.acl.sh <dir>"; exit 1; } appendAclFile="/tmp/append.acl" newAclFile="/tmp/new.acl" cd $dir for filename in $(find -follow | grep -v ^.$) do echo "Applying ACL to $filename..." mmgetacl -k nfs4 $filename -o $newAclFile cat $appendAclFile >> $newAclFile mmputacl $filename -i $newAclFile done rm -f $newAclFile $ chmod +x append.acl.sh $ ./append.acl.sh Usage: ./append.acl.sh <dir> $ time ./append.acl.sh /ibm/fs1/fset2 Applying ACL to ./dir30... Applying ACL to ./dir30/file10... Applying ACL to ./dir30/file9... ... ... $ Thanks, Chetan. From: "Nathan Falk" <nfalk@us.ibm.com> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/27/2019 10:37 PM Subject: Re: [gpfsug-discuss] Adding to an existing GPFS ACL Sent by: gpfsug-discuss-bounces@spectrumscale.org I think I gave an internal link. Try this instead: http://www.ibm.com/support/docview.wss?uid=ibm10716323 Nate Falk IBM Spectrum Scale Level 2 Support Software Defined Infrastructure, IBM Systems IBM E-mail:nfalk@us.ibm.com Find me on:LinkedIn: https://www.linkedin.com/in/nathan-falk-078ba5125 Twitter: https://twitter.com/natefalk922 From: "Nathan Falk" <nfalk@us.ibm.com> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/27/2019 01:04 PM Subject: Re: [gpfsug-discuss] Adding to an existing GPFS ACL Sent by: gpfsug-discuss-bounces@spectrumscale.org Hello Kevin, 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). I've had a few queries along these lines over the years and decided to publish a little bit of a guide here: https://www-prd-trops.events.ibm.com/node/how-recursively-set-nfsv4-acls-gpf... 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. Or as others have noted, export the fileset via NFS and go to an NFS client and use nfs4_setfacl instead. Thanks, Nate Falk IBM Spectrum Scale Level 2 Support Software Defined Infrastructure, IBM Systems IBM E-mail:nfalk@us.ibm.com Find me on:LinkedIn: https://www.linkedin.com/in/nathan-falk-078ba5125 Twitter: https://twitter.com/natefalk922 From: "Buterbaugh, Kevin L" <Kevin.Buterbaugh@Vanderbilt.Edu> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/27/2019 12:53 PM Subject: Re: [gpfsug-discuss] Adding to an existing GPFS ACL Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi Jonathan, 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. Unfortunately, in this situation item 2 is true, but item 1 is _not_. That’s what’s making this one a bit thorny… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu- (615)875-9633 On Mar 27, 2019, at 11:33 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org> wrote: I misunderstood you. 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. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 From: gpfsug-discuss-bounces@spectrumscale.org< gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 11:19:03 AM To: gpfsug main discussion list Subject: [EXT] Re: [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: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. Hi Jonathan, 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. Am I missing something? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu- (615)875-9633 On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org> wrote: Try mmeditacl. -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 From: gpfsug-discuss-bounces@spectrumscale.org< gpfsug-discuss-bounces@spectrumscale.org> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL WARNING: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. Hi All, 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… 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. 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! Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu- (615)875-9633 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0 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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org 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 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
mmeditacl passes a temporary file containing the ACLs to $EDITOR. You can write $EDITOR if you want. :) -- Stephen
On Mar 27, 2019, at 12:19 PM, Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu <mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> wrote:
Hi Jonathan,
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.
Am I missing something? Thanks…
Kevin
— Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu <mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633
On Mar 27, 2019, at 11:02 AM, Fosburgh,Jonathan <jfosburg@mdanderson.org <mailto:jfosburg@mdanderson.org>> wrote:
Try mmeditacl.
-- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346
From: gpfsug-discuss-bounces@spectrumscale.org <mailto:gpfsug-discuss-bounces@spectrumscale.org> <gpfsug-discuss-bounces@spectrumscale.org <mailto:gpfsug-discuss-bounces@spectrumscale.org>> on behalf of Buterbaugh, Kevin L <Kevin.Buterbaugh@Vanderbilt.Edu <mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> Sent: Wednesday, March 27, 2019 10:59:17 AM To: gpfsug main discussion list Subject: [EXT] [gpfsug-discuss] Adding to an existing GPFS ACL
WARNING: 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. Hi All,
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…
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.
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!
Thanks…
Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu <mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633
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. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org <http://spectrumscale.org/> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0 <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2Fmailman%2Flistinfo%2Fgpfsug-discuss&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7Cb2040f23087c4aac0b4908d6b2cf11ed%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C1%7C636892999763011551&sdata=pXhLlRfQuJ4bKfib4bQBlWY4OP5WoZh1YQ%2Bjne2ycEY%3D&reserved=0>
gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org <http://spectrumscale.org/> http://gpfsug.org/mailman/listinfo/gpfsug-discuss <http://gpfsug.org/mailman/listinfo/gpfsug-discuss>
On 27/03/2019 15:59, Buterbaugh, Kevin L wrote: [SNIP]
So am I missing something?
Nope you are not missing anything. Setting NFSv4 ACL's on GPFS on *LINUX* has always been a steaming pile of Brontosaurus droppings. I have been on about since 2011... Search the mailing list archives.
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!
The best option is to get yourself a pSeries machine, install AIX and GPFS and use the native AIX ACL command to set the ACL's. This works because AIX has a mechanism for passing NFSv4 ACL's through it's VFS interface. The RichACL kernel patches for Linux to give it the same functionality went nowhere. Noting that the XFS and JFS file systems, internally have NFSv4 ACL support. The next best option is to export it as an NSFv4 file system and use a Linux/FreeBSD machine to set the ACL's (a Mac might even work). Expect performance to not be great. The next best option is to do an SMB export, mount it on Linux and use setcifsacl or map it on Windows and use cacls command. Some experimentation on working out exactly how NFSv4 ACLS get mapped to Windows ACLS would be advisable before a mass apply though. I don't think it is possible to set all NFSv4 ACL options using this method. Probably the best option, but which is not publicly available is to use my modified version of the Linux nfs4_setacl command :-) You just modify nfs4_acl_for_path.c and nfs4_set_acl.c so they read/write the GPFS ACL struct and convert between the GPFS representation and the internal data structure used by the nfs4-acl-tools to hold NFSv4 ACL's. However I have not put it any where public because the GPFS API documentation is incomplete when it comes to ACL's. Consequently I can't be sure it is safe so I am not releasing it. I have two questions that I would like answering before I make it public. I will ask them for the third time, in hopes someone at IBM is actually listening. 1. What's the purpose of a special flag to indicate that it is smbd setting the ACL? Does this tie in with the undocumented "mmchfs -k samba" feature? 2. There is a whole bunch of stuff in the documentation about v4.1 ACL's. How does one trigger that. All I seem to be able to do is get POSIX and v4 ACL's. Do you get v4.1 ACL's if you set the file system to "Samba" ACL's or am I missing something. The other option is to write a script. Personally I would use Perl/Python rather than a shell script as it would be easier to read the result of mmgetacl into a buffer, append the extra bits and write it out again with mmputacl. It is horribly slow however if you have millions of files to iterate over. Trust me back in 2011 I had Perl scripts for setting ACL's. The final option though not quick would be for IBM to actually implement a mmsetfacl command. Surely it would not be too hard to take the code from AIX and modify the bits that set ACL's to use the GPFS API. Alternatively take the FreeBSD ACL commands and use them as a starting point. However I would not hold your breath for IBM if you expect them to fix the situation. JAB. -- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG
Sometimes, you just need the right channels in order to get IBM to implement changes.... -- Jonathan Fosburgh Principal Application Systems Analyst IT Operations Storage Team The University of Texas MD Anderson Cancer Center (713) 745-9346 [1553012336789_download] The final option though not quick would be for IBM to actually implement a mmsetfacl command. Surely it would not be too hard to take the code from AIX and modify the bits that set ACL's to use the GPFS API. Alternatively take the FreeBSD ACL commands and use them as a starting point. However I would not hold your breath for IBM if you expect them to fix the situation. 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.
participants (9)
-
Alexander Wolf -
Buterbaugh, Kevin L -
Chetan R Kulkarni -
Christof Schmitt -
Fosburgh,Jonathan -
Jonathan Buzzard -
Nathan Falk -
Olaf Weiser -
Stephen Ulmer
