Gentoo Archives: gentoo-user

From: "Yuri K. Shatroff" <yks-uno@××××××.ru>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] A non-root user can delete files belonging to root. What's going on?
Date: Fri, 13 Feb 2015 14:36:26
Message-Id: 54DE0BDB.4060805@yandex.ru
In Reply to: [gentoo-user] A non-root user can delete files belonging to root. What's going on? by Alan Mackenzie
1 13.02.2015 17:31, Alan Mackenzie пишет:
2 > Hi, Gentoo.
3 >
4 > I'm clearing out dross from my home directory, as me (not as root) and
5 > I've just deleted this file:
6 >
7 > -rw-r--r-- 1 root root 0 Apr 11 2011 grep
8 >
9 > , simply by typing $ rm grep. I was prompted with:
10 >
11 > rm: remove write-protected regular empty file ■grep■?
12 >
13 > , to which I responded 'y'. The file is now gone.
14 >
15 > So, as a non root user, I've managed to delete a file belonging to root,
16 > to which I have no write access. This is crazy! I'm not happy about
17 > this. What's going on?
18
19 The owner of a directory is able to delete any files in it. It would
20 really be weird otherwise.
21
22 --
23 Regards,
24 Yuri K. Shatroff

Replies