From 81eda8c70280f6eb32962963d344cbf99db2e636 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 10 Oct 2023 11:15:20 +0200 Subject: Log when a symlink is skipped due to lack of chmod/chown support --- perm_offset.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3