[SOLVED] setuid is automatically removed from ping exe after copying
by vincix from LinuxQuestions.org on (#53X1F)
Any ideas why the setuid would be automatically removed when I copy ping to /root, for instance?
Is this documented anywhere? Is it standard or maybe distro-related?
Code:root@testy:~# ls -l /bin/ping
-rwsr-xr-x 1 root root 64424 Jun 28 2019 /bin/ping
root@testy:~# cp /bin/ping /root
root@testy:~# ls -l /root/ping
-rwxr-xr-x 1 root root 64424 May 25 17:23 /root/pingThis is Ubuntu 18.04, which, weirdly enough, still uses setuid instead of capabilities for ping.


Is this documented anywhere? Is it standard or maybe distro-related?
Code:root@testy:~# ls -l /bin/ping
-rwsr-xr-x 1 root root 64424 Jun 28 2019 /bin/ping
root@testy:~# cp /bin/ping /root
root@testy:~# ls -l /root/ping
-rwxr-xr-x 1 root root 64424 May 25 17:23 /root/pingThis is Ubuntu 18.04, which, weirdly enough, still uses setuid instead of capabilities for ping.