Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
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 15:08:17
Message-Id: CAGfcS_nH7JDZExhoaP0Lv-a9XfAD91X_M3whv=sLMFKKOYZ=kA@mail.gmail.com
In Reply to: Re: [gentoo-user] A non-root user can delete files belonging to root. What's going on? by "Yuri K. Shatroff"
1 On Fri, Feb 13, 2015 at 9:36 AM, Yuri K. Shatroff <yks-uno@××××××.ru> wrote:
2 >
3 > The owner of a directory is able to delete any files in it. It would really
4 > be weird otherwise.
5 >
6
7 I think, to be more precise, anybody with write and execute access to
8 a directory (whether the owner or not) can remove files from a
9 directory, unless the directory's sticky bit is set. If the sticky
10 bit is set then only the owner of the directory can remove files not
11 owned by themselves (ie, for /tmp). I believe having write access to
12 the file itself is also sufficient to delete it.
13
14 --
15 Rich