home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25836 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.9 KB

  1. Path: sparky!uunet!nwnexus!remote!UUCP
  2. From: Darin.Wayrynen@f145.n114.z1.fidonet.org (Darin Wayrynen)
  3. Newsgroups: comp.os.linux
  4. Subject: 2 Linux ques. (read faq:
  5. Message-ID: <728264979.AA37063@remote.halcyon.com>
  6. Date: Wed, 27 Jan 1993 09:58:00 -0800
  7. Sender: UUCP@remote.halcyon.com
  8. Lines: 49
  9.  
  10. * In a message originally to All, Randy Edwards said:
  11.  
  12.  
  13.  
  14. [misc deletions]
  15.  
  16.  > As root, I made a dummy file named 'test.fil' with an owner
  17.  > and group 
  18.  > of 'root' and permissions of -rw-r--r--.  Then, I logged in
  19.  > as a normal 
  20.  > user and tried to rm the file.  I get a 'permission denied'
  21.  > response, 
  22.  > and the file remains intact.  Great.  Then, I immediately
  23.  > change 
  24.  > directories to /etc and do a 'rm passwd'.  To my surprise, I
  25.  > get a 
  26.  > response of 'rm: remove 'passwd', overriding mode 0600?'  So
  27.  > I type 'y' 
  28.  > and the system deletes my password file.  The password file
  29.  > was also 
  30.  > owned by and in group 'root' and had permissions of
  31.  > -rw-------.  What 
  32.  > boggles me is why does the system allow me to delete one
  33.  > file, but not 
  34.  > the other?  (Remember, I did this logged in as a user, not as
  35.  > root.). 
  36.  > To me, since I don't know what's going on, this gives me
  37.  > shudders and 
  38.  > fears of system security.  Can someone clue me in on what's
  39.  > happening 
  40.  > here (and how I might prevent it)? 
  41.  
  42. If a user has write permission on a directory, then he can remove
  43. files from it.  /etc is probaby drwxrwx--- or something like that,
  44. and the user you were logged in as was part of the same group as
  45. root.
  46.  
  47. Think of it this way.  If you were logged into /home/randy (assume
  48. that's your home directory), you wouldn't want people to put files
  49. in your directory that you couldn't delete correct?  So since you
  50. own it (and also you are part of the group that owns it) you can
  51. delete files in it...
  52.  
  53. Darin Wayrynen
  54. Paragon Consulting Group
  55.  
  56.  * Origin: Paragon BBS (602) 938-8288 (2.0 gigs/Windows/NT/C++ Support)
  57. (1:114/145)
  58.  
  59.