Hi everyone,

Running these commands:

~$ touch test
~$ chmod 4644 test
~$ ls -l test
-rwSr--r-- 1 frank frank 0 26 nov 19.56 test

~$ sudo chown root:root /home/frank/test
~$ ls -l test
-rw-r--r-- 1 root root 0 26 nov 19.56 test

As you can see the setuid bit of the "test" file has gone after running the "chown" command. The reason is explained here ¹ I'm interested in a workaround to prevent this behavior. Is it possible to change the group owner keeping the permissions of the file in its place?

Thanks in advance, kind regards.

¹ https://unix.stackexchange.com/a/772336
--
Franco Martelli

Reply via email to