This commit is contained in:
Patrick Schleizer 2019-12-21 07:43:55 -05:00
parent 7c3da38bd5
commit 1fe83d683f
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -34,7 +34,8 @@ undo_all() {
stat -c "%n %a %U %G" "$file_name" || true stat -c "%n %a %U %G" "$file_name" || true
chown "${owner}:${group}" "$file_name" || exit_code=202 chown "${owner}:${group}" "$file_name" || exit_code=202
## chmod need to be run after chown since chown would remove suid. ## chmod need to be run after chown since chown removes suid.
## https://unix.stackexchange.com/questions/53665/chown-removes-setuid-bit-bug-or-feature
chmod "$mode" "$file_name" || exit_code=203 chmod "$mode" "$file_name" || exit_code=203
stat -c "%n %a %U %G" "$file_name" || true stat -c "%n %a %U %G" "$file_name" || true