diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/Perms.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/Perms.py b/share/Perms.py index ff4af73..31d08c0 100755 --- a/share/Perms.py +++ b/share/Perms.py @@ -217,12 +217,6 @@ def act(change): # if the user has changed it manually if not change and not mandatory: newperm = newperm & mode - if newperm != -1 and mode != newperm: - try: - os.chmod(f, newperm) - log(_('changed mode of %s from %o to %o') % (f, mode, newperm)) - except: - error('chmod %s %o: %s' % (f, newperm, str(sys.exc_value))) if user != -1 and user != uid: try: os.chown(f, user, -1) @@ -235,6 +229,12 @@ def act(change): log(_('changed group of %s from %s to %s') % (f, get_group_name(gid), group_str)) except: error('chgrp %s %s: %s' % (f, group, str(sys.exc_value))) + if newperm != -1 and mode != newperm: + try: + os.chmod(f, newperm) + log(_('changed mode of %s from %o to %o') % (f, mode, newperm)) + except: + error('chmod %s %o: %s' % (f, newperm, str(sys.exc_value))) def chmod(f, newperm): try: |