home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!phavl!rob
- From: rob@phavl.UUCP (Robert Ransbottom)
- Newsgroups: comp.os.linux
- Subject: Re: PERMS.SH problem
- Message-ID: <366@phavl.UUCP>
- Date: 10 Jan 93 18:44:41 GMT
- References: <726540796.AA31381@remote.halcyon.com>
- Organization: erehton
- Lines: 114
-
- In article <726540796.AA31381@remote.halcyon.com> Randy.Edwards@f60.n128.z1.fidonet.org (Randy Edwards) writes:
- >
- > I grabbed Peter's PERMS.SH shell script which is supposed to fix the
- >
- >permission problems of the SLS release. However, my version os install
- >
- >refuses to accept the '-i' parm and simply prints out install's usage
-
- The '-i' option to install hasn't been added.
- Try putting this to sh instead, this is rewrite & expansion
- upon Peter's perms.sh.
-
- #===========================
- # set_perm.sh
-
- if test $LOGNAME != "root"
- then
- echo "Please login as root to run this command."
- exit 1
- fi
-
- UB=/usr/bin
- UM=/usr/man
- US=/usr/spool
-
- mkdir /usr/tmp $US/uucp
-
- chown root /bin /usr /lib /home /user /mnt $UB /usr/lib $UM $UM/*
- chown root $US $US/mail $US/uucp /usr/adm
- chgrp root /bin /usr /lib /home /user /mnt $UB /usr/lib $UM $UM/*
- chgrp root $US $US/mail $US/uucp /usr/adm
- chmod 755 /bin /usr /lib /home /user /mnt $UB /usr/lib $UM $UM/*
- chmod 755 $US $US/mail $US/uucp /usr/adm
-
- chown root /tmp /usr/tmp
- chgrp root /tmp /usr/tmp
- chmod 1777 /tmp /usr/tmp
-
- chown root $UM $UM/* $UM/*/*
- chgrp root $UM $UM/* $UM/*/*
- chmod 755 $UM $UM/* $UM/*/*
-
- find $UM/* -type f -print | xargs chmod 644
-
- chown root $US $US/mail $US/uucp /usr/adm
- chgrp root $US $US/mail $US/uucp /usr/adm
- chmod 755 $US $US/mail $US/uucp /usr/adm
-
- find /usr/lib/* -print | xargs chown root
- find /usr/lib/* -print | xargs chgrp root
- find /usr/lib/* -type f -print | xargs chmod a+r
- find /usr/lib/* -type d -print | xargs chmod a+rx
-
- for i in /home/* /usr2/*; do
- touch $US/mail/`basename $i`
- chown `basename $i` $i $i/* $US/mail/`basename $i`
- chmod 660 $US/mail/`basename $i`
- chgrp mail $US/mail/`basename $i`
- done
- chmod 755 /home/* /usr2/*
- chgrp other /home/* /usr2/*
-
- chmod a+r /etc/profile /etc/utmp
-
- #----
-
- chmod a+r /etc/group /etc/magic /etc/passwd
- chmod go-rwx /etc/shadow
- chgrp mail $US/mail
- chmod g+rwx $US/mail
-
-
- # fix over long filenames for 14 character file systems
-
- cat $UM/catn/x11perfcomp.n. |
- compress -dc > $UM/catn/x11perfcomp.n &&
- rm $UM/catn/x11perfcomp.n.
- cat $UM/cat2/sethostname.2. |
- compress -dc > $UM/cat2/sethostname.2 &&
- rm $UM/cat2/sethostname.2.
-
-
- # allow use of ps
- chmod g+s $UB/ps
- chmod g+r /dev/kmem
- chmod 755 /usr/src/linux/tools/system
-
- # allow use of commands text files
- chmod a+r /bin/nohup $UB/apropos $UB/arch $UB/c++ $UB/c2ph $UB/f77
- chmod a+r $UB/find2perl $UB/ftar $UB/g++ $UB/g++dep $UB/genclass $UB/h2ph
- chmod a+r $UB/mesg $UB/nngrab $UB/nnstats $UB/nnusage $UB/nohup $UB/pstruct
- chmod a+r $UB/s2p $UB/users $UB/whatis $UB/zf
-
- # allow ascii text commands
- chmod a+r $UB/bdftops $UB/clisp $UB/cppstdin $UB/diskcopy $UB/font2c
- chmod a+r $UB/gsbj $UB/gsdj $UB/gslj $UB/gslp $UB/gsnd $UB/lex
- chmod a+r $UB/lnsize $UB/print $UB/reset $UB/sysbuild $UB/zcmp
- chmod a+r $UB/zdiff $UB/zmore
-
- # allow shell archive and/or antique kernel text commands
- chmod a+r /$UB/Pnews /$UB/Rnmail /$UB/checkalias /$UB/findaffix
- chmod a+r /$UB/messages /$UB/munchlist /$UB/newsetup /$UB/newsgroups
- chmod a+r /$UB/printmail /$UB/tryaffix
-
- # allow english text commands
- # chmod a+r $UB/sysinstall $UB/WasLocal
-
- # silence halt complaint
- ln /etc/umount /bin/umount
-
- #==================
- --
- rob Robert Ransbottom
- "It is extremely important to maintain correct attributions." -- anonymous
-