home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 23480 < prev    next >
Encoding:
Internet Message Format  |  1993-01-10  |  3.5 KB

  1. Path: sparky!uunet!phavl!rob
  2. From: rob@phavl.UUCP (Robert Ransbottom)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: PERMS.SH problem
  5. Message-ID: <366@phavl.UUCP>
  6. Date: 10 Jan 93 18:44:41 GMT
  7. References: <726540796.AA31381@remote.halcyon.com>
  8. Organization: erehton
  9. Lines: 114
  10.  
  11. In article <726540796.AA31381@remote.halcyon.com> Randy.Edwards@f60.n128.z1.fidonet.org (Randy Edwards) writes:
  12. >
  13. >   I grabbed Peter's PERMS.SH shell script which is supposed to fix the
  14. >
  15. >permission problems of the SLS release.  However, my version os install
  16. >
  17. >refuses to accept the '-i' parm and simply prints out install's usage 
  18.  
  19. The '-i' option to install hasn't been added.  
  20. Try putting this to sh instead, this is rewrite & expansion 
  21. upon Peter's perms.sh.
  22.  
  23. #===========================
  24. # set_perm.sh
  25.  
  26. if test $LOGNAME != "root"
  27. then
  28.     echo "Please login as root to run this command."
  29.     exit 1
  30. fi
  31.  
  32. UB=/usr/bin
  33. UM=/usr/man
  34. US=/usr/spool
  35.  
  36. mkdir /usr/tmp $US/uucp
  37.  
  38. chown root /bin /usr /lib /home /user /mnt $UB /usr/lib $UM $UM/*
  39. chown root $US $US/mail $US/uucp /usr/adm
  40. chgrp root /bin /usr /lib /home /user /mnt $UB /usr/lib $UM $UM/*
  41. chgrp root $US $US/mail $US/uucp /usr/adm
  42. chmod 755 /bin /usr /lib /home /user /mnt $UB /usr/lib $UM $UM/*
  43. chmod 755 $US $US/mail $US/uucp /usr/adm
  44.  
  45. chown root /tmp /usr/tmp
  46. chgrp root /tmp /usr/tmp
  47. chmod 1777 /tmp /usr/tmp
  48.  
  49. chown root $UM $UM/* $UM/*/*
  50. chgrp root $UM $UM/* $UM/*/*
  51. chmod 755 $UM $UM/* $UM/*/*
  52.  
  53. find $UM/* -type f -print | xargs chmod 644     
  54.  
  55. chown root $US $US/mail $US/uucp /usr/adm
  56. chgrp root $US $US/mail $US/uucp /usr/adm
  57. chmod 755 $US $US/mail $US/uucp /usr/adm
  58.  
  59. find /usr/lib/* -print | xargs chown root
  60. find /usr/lib/* -print | xargs chgrp root
  61. find /usr/lib/* -type f -print | xargs chmod a+r
  62. find /usr/lib/* -type d -print | xargs chmod a+rx
  63.  
  64. for i in /home/* /usr2/*; do
  65.     touch $US/mail/`basename $i`
  66.     chown `basename $i` $i $i/* $US/mail/`basename $i`
  67.     chmod 660 $US/mail/`basename $i`
  68.     chgrp mail $US/mail/`basename $i`
  69. done
  70. chmod 755 /home/* /usr2/*
  71. chgrp other /home/* /usr2/*
  72.  
  73. chmod a+r /etc/profile /etc/utmp
  74.  
  75. #----
  76.  
  77. chmod a+r /etc/group /etc/magic /etc/passwd
  78. chmod go-rwx /etc/shadow
  79. chgrp mail $US/mail
  80. chmod g+rwx $US/mail
  81.  
  82.  
  83. # fix over long filenames for 14 character file systems
  84.  
  85. cat $UM/catn/x11perfcomp.n. | 
  86.     compress -dc > $UM/catn/x11perfcomp.n && 
  87.         rm $UM/catn/x11perfcomp.n.
  88. cat $UM/cat2/sethostname.2. | 
  89.     compress -dc > $UM/cat2/sethostname.2 && 
  90.         rm $UM/cat2/sethostname.2.
  91.  
  92.  
  93. # allow use of ps
  94. chmod g+s $UB/ps
  95. chmod g+r /dev/kmem
  96. chmod 755 /usr/src/linux/tools/system
  97.  
  98. # allow use of commands text files
  99. chmod a+r /bin/nohup $UB/apropos $UB/arch $UB/c++ $UB/c2ph $UB/f77
  100. chmod a+r $UB/find2perl $UB/ftar $UB/g++ $UB/g++dep $UB/genclass $UB/h2ph 
  101. chmod a+r $UB/mesg $UB/nngrab $UB/nnstats $UB/nnusage $UB/nohup $UB/pstruct 
  102. chmod a+r $UB/s2p $UB/users $UB/whatis $UB/zf
  103.  
  104. # allow ascii text commands
  105. chmod a+r $UB/bdftops $UB/clisp $UB/cppstdin $UB/diskcopy $UB/font2c
  106. chmod a+r $UB/gsbj $UB/gsdj $UB/gslj $UB/gslp $UB/gsnd $UB/lex
  107. chmod a+r $UB/lnsize $UB/print $UB/reset $UB/sysbuild $UB/zcmp
  108. chmod a+r $UB/zdiff $UB/zmore
  109.  
  110. # allow shell archive and/or antique kernel text commands
  111. chmod a+r /$UB/Pnews /$UB/Rnmail /$UB/checkalias /$UB/findaffix
  112. chmod a+r /$UB/messages /$UB/munchlist /$UB/newsetup /$UB/newsgroups
  113. chmod a+r /$UB/printmail /$UB/tryaffix
  114.  
  115. # allow english text commands 
  116. # chmod a+r $UB/sysinstall $UB/WasLocal
  117.  
  118. # silence halt complaint
  119. ln /etc/umount /bin/umount
  120.  
  121. #==================
  122. -- 
  123. rob   Robert Ransbottom
  124. "It is extremely important to maintain correct attributions." -- anonymous
  125.