Re: File Permissions
From: Dan Anderson (dan_at_mathjunkies.com)
Date: 11/28/03
- Next message: nolo: "Re: building the kernel"
- Previous message: Robert Newson: "Re: Crash of linux on RedHat and Knoppix"
- In reply to: Michael Gerbasio: "File Permissions"
- Next in thread: Robert Newson: "Re: File Permissions"
- Reply: Robert Newson: "Re: File Permissions"
- Reply: Michael Gerbasio: "Re: File Permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Nov 2003 20:31:17 GMT
"Michael Gerbasio" <mwgerbasio@hotmail.com> writes:
> root. I created a user "myuser" which is part of the "user" group. The
> partition permissions are set for drwxr-xr-x so I would expect the only one
> able to read and write to this directory would be the owner, in this case
> root, or a member of the root group. However, the user I created "myuser"
> can write to this directory even though it is a member of the user group,
> not the root group.
It is possible to change a directory in such a way that it is
writable by anyone so long as they either a) write a new file or b)
modify their old files. I believe it's called a setuid bit and you do
it by chmod +u a directory, but don't quote me. It is also possible
to use this as a way to force a script/program to be run as its owner.
This is a setup most often used for the upload directory of
file servers / ftp servers, etc. Samaba seems like an ideal candidate
for this. Also it is used if you need to give an ordinary user
extraordinary permissions. For instance, in some setups normal users
aren't allowed to read /proc . This is bad if normal users need to
use programs that depend on /proc (i.e. df?). So if you setuid df and
it is owned by root, df will be able to read the /proc directory
because it is root. Of course there are a number of dangers
assosciated with this, because df could also rm -fR / as root
(possible if somebody figured out a way to exploit df or gave you a
version they altered -- a remote possibility if you're smart about
these things but still a possibility).
DISCLAIMER:
info chmod for more information. I know the above things
exist but generally don't use them, so my mind is a little fuzzy on
the exact details (what chmod command to setuid forinstance and if
setuid is what I should be calling it -- I forget). I just figured it
would help you understand. :-D
-Dan
- Next message: nolo: "Re: building the kernel"
- Previous message: Robert Newson: "Re: Crash of linux on RedHat and Knoppix"
- In reply to: Michael Gerbasio: "File Permissions"
- Next in thread: Robert Newson: "Re: File Permissions"
- Reply: Robert Newson: "Re: File Permissions"
- Reply: Michael Gerbasio: "Re: File Permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|