SUID on Solaris versus Linux
From: Hameed, Amir <Amir.Hameed_at_xerox.com>
Date: Tue, 27 Nov 2012 21:03:29 +0000
Message-ID: <AF02C941134B1A4AB5F61A726D08DCED0512CE_at_USA7109MB012.na.xerox.net>
Folks,
I am trying to understand why the SUID is behaving differently on Solaris versus Linux. It is working fine on Solaris and not working on Linux. I have a test script that I am running on both Solaris and Linux. The storage is NAS based and "suid" is set in the mount command. Here are the contents of the script:
cat /tmp/t1
#!/bin/sh
touch /home/oracle/1
Date: Tue, 27 Nov 2012 21:03:29 +0000
Message-ID: <AF02C941134B1A4AB5F61A726D08DCED0512CE_at_USA7109MB012.na.xerox.net>
Folks,
I am trying to understand why the SUID is behaving differently on Solaris versus Linux. It is working fine on Solaris and not working on Linux. I have a test script that I am running on both Solaris and Linux. The storage is NAS based and "suid" is set in the mount command. Here are the contents of the script:
cat /tmp/t1
#!/bin/sh
touch /home/oracle/1
$ ls -ltr /tmp/t1
-rwsr-xr-x 1 oracle oinstall 31 Nov 27 13:39 /tmp/t1
When I run this script from another ID on Solaris, it runs fine:
$ id
uidu120(amir) gid50(dba)
$ /tmp/t1
$ ls -ltr /home/oracle/1
-rw-r--r-- 1 oracle dba 0 Nov 27 15:59 /home/oracle/1
When I run it on Linux, it fails:
$id
uidu120(amir) gid50(dba) groups50(dba)
$/tmp/t1
touch: cannot touch `/home/oracle/1': Permission denied
Any idea why SUID is not working on Linux the way it is on Solaris.
Thanks
Amir
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Nov 27 2012 - 22:03:29 CET