K V
Thanks for the feedback. I now tried to do the same thing with a C++ program instead of a shell script:
#include
int main() { system("touch /etc/resolv.conf"); return 0; } with permissions as follows:
-rwsr-sr-x 1 root root 8691 2003-11-22 17:02 a.out
However, the same problem occurs:
klaus@linux:~> ./a.out touch: cannot touch `/etc/resolv.conf': Permission denied
Use:
#include
Maybe the problem is that the 'suid' bit can be set only for 'user' and 'group', but not for others?
Some description of the concept is in man pages of setuid, ... If I remember it right, a good description was in the book "Linux Application Development" (see http://people.redhat.com/johnsonm/lad/contents.html). -- A.M.