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

  1. Path: sparky!uunet!phavl!rob
  2. From: rob@phavl.UUCP (Robert Ransbottom)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: Permissions in SLS
  5. Message-ID: <362@phavl.UUCP>
  6. Date: 7 Jan 93 16:14:24 GMT
  7. References: <1992Dec29.214548.3694@sol.UVic.CA>
  8. Organization: erehton
  9. Lines: 61
  10.  
  11. In article <1992Dec29.214548.3694@sol.UVic.CA> pmacdona@sanjuan (Peter MacDonald) writes:
  12.  
  13. >Here is how I want to handle permission setting in SLS.
  14. >Like just about all other administration, I want to use
  15. >a shell script.  So I intend to modify/extend install
  16. >to allow it to modify files in place, plus a few other
  17. >goodies documented briefly below in the very simple
  18. >example I cobbled together.
  19.  
  20. This is a rewrite of the script that Peter posted.  This doesn't
  21. require the yet to be released modified install program.
  22.  
  23. I have added a few files for read access: 
  24.     /etc/profile /etc/utmp /etc/wtmp
  25.  
  26. I have not yet checked my /dev/[hs]da* devices to see if they are 
  27. reasonably secure.
  28.  
  29. ----set_perms.sh------
  30.  
  31. mkdir /usr/tmp /usr/spool/uucp
  32.  
  33. chown root /bin /usr /lib /home /user /mnt /usr/bin /usr/lib /usr/man /usr/man/*
  34. chown root /usr/spool /usr/spool/mail /usr/spool/uucp /usr/adm
  35. chgrp root /bin /usr /lib /home /user /mnt /usr/bin /usr/lib /usr/man /usr/man/*
  36. chgrp root /usr/spool /usr/spool/mail /usr/spool/uucp /usr/adm
  37. chmod 755 /bin /usr /lib /home /user /mnt /usr/bin /usr/lib /usr/man /usr/man/*
  38. chmod 755 /usr/spool /usr/spool/mail /usr/spool/uucp /usr/adm
  39.  
  40. chown root /tmp /usr/tmp
  41. chgrp root /tmp /usr/tmp
  42. chmod 1777 /tmp /usr/tmp
  43.  
  44. chown root /usr/man /usr/man/* /usr/man/*/*
  45. chgrp root /usr/man /usr/man/* /usr/man/*/*
  46. chmod 755 /usr/man /usr/man/* /usr/man/*/*
  47.  
  48. find /usr/man/* -type f -print | xargs chmod 644     
  49.  
  50. chown root /usr/spool /usr/spool/mail /usr/spool/uucp /usr/adm
  51. chgrp root /usr/spool /usr/spool/mail /usr/spool/uucp /usr/adm
  52. chmod 755 /usr/spool /usr/spool/mail /usr/spool/uucp /usr/adm
  53.  
  54. find /usr/lib/* -print | xargs chown root
  55. find /usr/lib/* -print | xargs chgrp root
  56. find /usr/lib/* -type f -print | xargs chmod a+r
  57. find /usr/lib/* -type d -print | xargs chmod a+rx
  58.  
  59. for i in /home/* ; do
  60.     touch /usr/spool/mail/`basename $i`
  61.     chown `basename $i` $i $i/* /usr/spool/mail/`basename $i`
  62.     chmod 660 /usr/spool/mail/`basename $i`
  63.     chgrp mail /usr/spool/mail/`basename $i`
  64. done
  65. chmod 755 /home/*
  66. chgrp other /home/*
  67.  
  68. chmod a+r /etc/profile /etc/utmp /etc/wtmp
  69. -- 
  70. rob   Robert Ransbottom
  71. "It is extremely important to maintain correct attributions." -- anonymous
  72.