diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-10-10 11:15:20 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-10-10 11:15:20 +0200 |
commit | 81eda8c70280f6eb32962963d344cbf99db2e636 (patch) | |
tree | 379e4b6fd172effbb955ee0a15d4c225187def3c | |
parent | 80d204cc94f3514dc46387534eb9f8e4d72719ff (diff) |
Log when a symlink is skipped due to lack of chmod/chown support
-rwxr-xr-x | perm_offset.py | 2 |
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) |