summaryrefslogtreecommitdiff
path: root/perm_offset.py
diff options
context:
space:
mode:
Diffstat (limited to 'perm_offset.py')
-rwxr-xr-xperm_offset.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/perm_offset.py b/perm_offset.py
index 3f23ab1..20305ad 100755
--- a/perm_offset.py
+++ b/perm_offset.py
@@ -24,11 +24,13 @@ def remap_file(fpath, src, dst, count, dry_run):
return
if S_ISLNK(stat.st_mode) and not os.chown in os.supports_follow_symlinks:
+ logging.debug('Skipping link, os.chown() does not support symlinks: %s', fpath)
return
os.chown(fpath, uid, gid, follow_symlinks = False)
# chown may clear setuid bits, so make sure to preserve them
if S_ISLNK(stat.st_mode) and not os.chmod in os.supports_follow_symlinks:
+ logging.debug('Skipping link, os.chmod() does not support symlinks: %s', fpath)
return
os.chmod(fpath, mode, follow_symlinks = False)