Created
September 17, 2015 04:38
-
-
Save yradunchev/92ea87ddcd9e681809ad to your computer and use it in GitHub Desktop.
Directory ACL Audit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| DAT=$( date +%Y%m%d%H%M ) | |
| printf "\n-----\CLIENTNAME GRP REPORT ${DAT}\n-----\n" > AUDIT_${DAT}.TXT | |
| cat /etc/group | cut -d: -f1,4 | grep -E clientname_[a-z]+_ | sort | column -t -s: >> AUDIT_${DAT}.TXT | |
| printf "\n\n-----\nCLIENTNAME ACL REPORT ${DAT}\n-----\n" >> AUDIT_${DAT}.TXT | |
| find /SFTP_ROOT/CLIENTNAME/ -maxdepth 4 -type d -exec getfacl --tabular --omit-header --absolute-names {} \; >> AUDIT_${DAT}.TXT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment