[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in rm command ?
From: |
Patrick Meylemans |
Subject: |
Bug in rm command ? |
Date: |
Mon, 16 Apr 2001 11:32:36 +0200 |
Dear,
Can you have a look at a possible bug in the rm command ?
I installed a Linux system, created a user and did some tests with file
permissions, have a look at the result please :
The system
bash-2.04$ uname -a
Linux netforce.site04.wtcm.be 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686
unknown
bash-2.04$ cat /etc/issue
Red Hat Linux release 7.0 (Guinness)
Kernel 2.2.16-22 on an i686
The password file
address@hidden /root]# cat /etc/passwd
root:E14.aq1vw7DLI:0:0:root:/root:/bin/bash
bin:*:1:1:bin:/bin:
daemon:*:2:2:daemon:/sbin:
adm:*:3:4:adm:/var/adm:
lp:*:4:7:lp:/var/spool/lpd:
sync:*:5:0:sync:/sbin:/bin/sync
shutdown:*:6:0:shutdown:/sbin:/sbin/shutdown
halt:*:7:0:halt:/sbin:/sbin/halt
mail:*:8:12:mail:/var/spool/mail:
news:*:9:13:news:/var/spool/news:
uucp:*:10:14:uucp:/var/spool/uucp:
operator:*:11:0:operator:/root:
games:*:12:100:games:/usr/games:
gopher:*:13:30:gopher:/usr/lib/gopher-data:
ftp:*:14:50:FTP User:/var/ftp:
nobody:*:99:99:Nobody:/:
mailnull:!!:47:47::/var/spool/mqueue:/dev/null
rpc:!!:32:32:Portmapper RPC user:/:/bin/false
named:!!:25:25:Named:/var/named:/bin/false
mike:hMYfGwBlRkk5c:2000:2000:tes account:/users/mike:/bin/bash
The group file
address@hidden /root]# cat /etc/group
root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm
adm::4:root,adm,daemon
tty::5:
disk::6:root
lp::7:daemon,lp
mem::8:
kmem::9:
wheel::10:root
mail::12:mail
news::13:news
uucp::14:uucp
named:x:25:
mike::2000:
We create a file in the home of mike called rootfile, this file is owned bij
root
echo test > /users/mike/rootfile
We log in as the user mike
bash-2.04$ whoami
mike
bash-2.04$ who am i
netforce.site04.wtcm.be!mike pts/1 Apr 16 12:16
bash-2.04$
bash-2.04$ ls -l
total 4
-rw-r--r-- 1 root root 5 Apr 16 12:17 rootfile
now we delete the file rootfile (this should be impossible !)
bash-2.04$ rm rootfile
rm: remove write-protected file `rootfile'? y
bash-2.04$ ls -l
total 0
How is this possible ?
Is there something I do wrong or is it a serious bug in the rm command or in
the file system ?
Kind Regards
Patrick Meylemans
ICS Manager WTCM-CRIF
Celestijnenlaan 300C
3001 Heverlee
- Bug in rm command ?,
Patrick Meylemans <=