  | | | chmod +s not working as expected | chmod +s not working as expected 2003-11-27 - By James Ho
Back Hi All,
I just transported a program from Red Hat Linux 6.2 to Red Hat Linux 7.3. The C program has a line stating: system ("whoami");
The permission of the executable is 6777 (ie. -rwsrwsrwx) and the owner of the program is "user1".
Using another user login "user99", I execute the program in both Red Hat Linux 6.2 and 7.3. In 6.2, I get the output "user1" In 7.3, I get the output "user99"
Why is this? Is there any way I can get the program work as it did in Red Hat Linux 6.2?
Thanks in advance.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Hi All, </FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I just transported a program from Red Hat Linux 6 .2 to Red Hat Linux 7.3.</FONT></DIV> <DIV><FONT face=Arial size=2>The C program has a line stating:</FONT></DIV> <DIV><FONT face=Arial size=2> system ("whoami");</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>The permission of the executable is 6777 (ie. -rwsrwsrwx) and the</FONT></DIV> <DIV><FONT face=Arial size=2>owner of the program is "user1".</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Using another user login "user99", I execute the program in both Red Hat </FONT></DIV> <DIV><FONT face=Arial size=2>Linux 6.2 and 7.3.</FONT></DIV> <DIV><FONT face=Arial size=2> In 6.2, I get the output "user1"</FONT></DIV> <DIV><FONT face=Arial size=2> In 7.3, I get the output "user99"</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Why is this? Is there any way I can get the program work as it did</FONT></DIV> <DIV><FONT face=Arial size=2>in Red Hat Linux 6.2?</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Thanks in advance.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>
|
|
 |