[SunHELP] Permissions on /usr/lib/rsh

Chris Hall chall at verio.net
Wed Dec 11 09:23:37 CST 2002


[cjep at fawlty.net] Wed, Dec 11, 2002 at 07:14:48AM +0000 wrote:
> On Tue, Dec 10, 2002 at 03:51:05PM -0600, Chris Hall wrote:
> >    Is this normal behavior ? 
> > 
> > # echo $SHELL
> > /sbin/sh
> > # uname -a
> > SunOS host0.mydomain.com 5.8 Generic_108528-13 sun4u sparc SUNW,UltraSPARC-IIi-Engine
> > # hostname
> > host0.mydomain.com
> > # ls -al /usr/lib/rsh
> > -r-xr-xr-x   4 root     root       95316 Mar 12  2002 /usr/lib/rsh
> > # chmod 000 /usr/lib/rsh
> > # ls -al /usr/lib/rsh
> > ----------   4 root     root       95316 Mar 12  2002 /usr/lib/rsh
> > # clear
> > /bin/clear: Permission denied.
> > # hostname
> > /bin/hostname: Permission denied.
> > # /usr/bin/bash
> > bash-2.03# hostname
> > bash: /usr/bin/hostname: Permission denied
> > bash-2.03# clear
> > bash: /usr/bin/clear: Permission denied
> 
> It is the correct behaviour. As soon as you change the permissions on 
> /usr/lib/rsh, you do so on /usr/bin/sh (it is the same file). 
> Hostname and clear are sh shell scripts, so will no longer run.
> machine% file /bin/hostname 
> /bin/hostname:  executable /usr/bin/sh script
> machine% ls -la /usr/bin/sh
> ----------   4 root     root       82624 Nov 21 23:13 /usr/bin/sh
> machine% sudo chmod 555 /usr/lib/rsh 
> machine% ls -la /usr/bin/sh
> -r-xr-xr-x   4 root     root       82624 Nov 21 23:13 /usr/bin/sh
> 
   Yeah, this was brought to my attention shortly after i posted. I left my 
brain at home yesterday, Thanks for the help ;-)


-- 
Thanks,

- Chris Hall

  "The growing use of e-mail, not to mention Web-page publishing, threatens 
to reverse the trend towards illiteracy among the supposedly educated without, 
at the same time improving their spelling".
                                               -- Michael Swaine, Dr. Dobb's Journal



More information about the SunHELP mailing list