diff options
author | B Stack <bgstack15@gmail.com> | 2018-06-05 21:54:43 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2018-06-05 21:57:10 -0400 |
commit | 9411d13c4940ccce70070327b1e40b690ed2813c (patch) | |
tree | 35960e6640da83b4e1f5984f97865bb89bda644a /ansible-own.sh | |
download | former-gists-9411d13c4940ccce70070327b1e40b690ed2813c.tar.gz former-gists-9411d13c4940ccce70070327b1e40b690ed2813c.tar.bz2 former-gists-9411d13c4940ccce70070327b1e40b690ed2813c.zip |
initial retrieval from github
Diffstat (limited to 'ansible-own.sh')
-rw-r--r-- | ansible-own.sh/ansible-own.sh | 11 | ||||
-rw-r--r-- | ansible-own.sh/description | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/ansible-own.sh/ansible-own.sh b/ansible-own.sh/ansible-own.sh new file mode 100644 index 0000000..400b009 --- /dev/null +++ b/ansible-own.sh/ansible-own.sh @@ -0,0 +1,11 @@ +#!/bin/sh +ansibleown_version="2018-04-04a" +tu=ansible +tg="$( id -ng "${tu}" )" +for word in $@ ; +do + # set group accessible + find ${word} -exec chown "${tu}:${tg}" {} \; -exec chmod g+rwX {} \; + # set setgid and sticky bits + find ${word} -type d -exec chmod g+s,o+t {} \; +done diff --git a/ansible-own.sh/description b/ansible-own.sh/description new file mode 100644 index 0000000..da33dae --- /dev/null +++ b/ansible-own.sh/description @@ -0,0 +1 @@ +Script that enforces ansible ownership of ansible files
\ No newline at end of file |