summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Stanley <jonstanley@gmail.com>2009-12-10 00:36:58 -0500
committerJon Stanley <jonstanley@gmail.com>2009-12-10 00:36:58 -0500
commitde61d14764d29daaabdd4c345e1a28804be0bf87 (patch)
treeca405550216986f4d4fb4ff1c7c471147f77324e
parent9c4793474b7c72df80ff99e93d80029cbaa23bd0 (diff)
downloadcvssetfacl-de61d14764d29daaabdd4c345e1a28804be0bf87.tar.gz
cvssetfacl-de61d14764d29daaabdd4c345e1a28804be0bf87.tar.xz
cvssetfacl-de61d14764d29daaabdd4c345e1a28804be0bf87.zip
Change ownership of all the files currently in the directory as well
-rwxr-xr-xsetacls.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/setacls.py b/setacls.py
index 3d6e81a..ea67fd6 100755
--- a/setacls.py
+++ b/setacls.py
@@ -152,8 +152,10 @@ def apply_acls(acl_dict, dry_run=False):
if os.path.isdir(real_file):
acl_dict[dir].applyto(real_file, posix1e.ACL_TYPE_DEFAULT)
acl_dict[dir].applyto(real_file, posix1e.ACL_TYPE_ACCESS)
+ os.chown(real_file, 0, scm_admin_gid)
if os.path.isfile(real_file):
acl_dict[dir].applyto(real_file, posix1e.ACL_TYPE_ACCESS)
+ os.chown(real_file, 0, scm_admin_gid)
else:
print 'would apply the following ACL to %s' % real_file
print acl_dict[dir]