Last active
December 19, 2019 10:14
-
-
Save seanorama/b42fbc1d30d888b4f8fb7467b4646bab to your computer and use it in GitHub Desktop.
read only with setfacl
This file contains 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
group="hadoop-admins" | |
dirs=" | |
/var/log/ambari-agent | |
/var/log/ambari-server | |
/var/log/ambari-infra-solr | |
/var/log/ambari-infra-solr-client | |
/var/log/ambari-logsearch-logfeeder | |
/var/log/ambari-logsearch-portal | |
/var/log/ambari-metrics-agent | |
/var/log/ambari-metrics-collector | |
/var/log/ambari-metrics-grafana | |
/var/log/ambari-metrics-monitor | |
/var/log/atlas | |
/var/log/druid | |
/var/log/hadoop | |
/var/log/hadoop-httpfs | |
/var/log/hadoop-mapreduce | |
/var/log/hadoop-yarn | |
/var/log/hadoop/httpfs | |
/var/log/hbase | |
/var/log/hive | |
/var/log/hive2 | |
/var/log/hive-hcatalog | |
/var/log/hst | |
/var/log/infra-solr-client | |
/var/log/kafka | |
/var/log/knox | |
/var/log/livy2 | |
/var/log/nifi | |
/var/log/nifi-registry | |
/var/log/oozie | |
/var/log/ranger/admin | |
/var/log/ranger/kms | |
/var/log/ranger/tagsync | |
/var/log/ranger/usersync | |
/var/log/registry | |
/var/log/smartsense-activity | |
/var/log/spark | |
/var/log/spark2 | |
/var/log/superset | |
/var/log/webchat | |
/var/log/zeppelin | |
/var/log/zookeeper | |
" | |
for dir in ${dirs}; do | |
sudo setfacl -d -m "g:${group}:rX" "${dir}" | |
sudo setfacl -R -m "g:${group}:rX" "${dir}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment