setuid nem megy

Fórumok

Nagyon alap kerdes:
Miert nem root-kent fut a uid.sh?

sedo@icon:~$ cat uid.sh
touch teszt.txt
chown root:root teszt.txt

sedo@icon:~$ ls -l uid.sh
-rwsr-xr-x 1 root root 42 2009-07-23 09:52 uid.sh

sedo@icon:~$ ./uid.sh
chown: changing ownership of `teszt.txt': Operation not permitted

Hozzászólások

Mert scriptekre rendszerint nem lehet setuid-ot állítani, csak binárisra.