From: Michael Hoennig <michael@hostsharing.net>
To: Jesse Pollard <pollard@tomcat.admin.navo.hpc.mil>
Cc: pollard@tomcat.admin.navo.hpc.mil, linux-kernel@vger.kernel.org
Subject: Re: suid bit on directories
Date: Mon, 20 May 2002 23:15:26 +0200 [thread overview]
Message-ID: <20020520231526.12e24b48.michael@hostsharing.net> (raw)
In-Reply-To: <200205201928.OAA13328@tomcat.admin.navo.hpc.mil>
Hi Jesse,
> > of course not, but many features have to be used carefully, like the
> > suid bit on files too!
>
> That CAN be audited. Putting a suid on a directory CAN'T.
Of course it can. You can easily list all files with this flag set.
> > I don't want to make the bahaviour or a suid bit on directories the
> > default! I just would like it as a mount option, or even something
> > which you have to compile into the kernel.
>
> Once mounted/compiled in you have lost control.
How do you come to that conclusion? Even if it were the case: I don't
force you to use this mount option.
> > Why do you ignore my example? In my example the use who runs the
> > webserver owns all the files, that is wrong. With the suid bit on
> > directories, this could be fixed.
>
> That is NOT wrong. The files belong to the server. Not a user. I've been
> running a server that way for years.
Files can only belong to users, not to server processes.
> And ANY user can put files into YOUR directory. Even files you don't
> want there. AND you can't tell who did it.
Nope. Only httpd and the user who should onw the files (the User of the
VirtualHost) can reach the directory in my case. Nobody else can even
reach it.
> Remember - with this facility any penetration of of a server suddenly
> becomes a penetration of every user with such a directory.
With the rights of wwwrun/httpd you can do more damange in this case than
with the rights of one user. In this case that are special accounts for
running CGIs etc.
> > > How are you going to control it?
> >
> > Only the owner of the directories can set this flag. There is nothing
> > to control.
>
> Ah - so I can put files into your directory, and suddenly they are owned
> by you.
You would not even reach this directory. That is assured because it is
child of a dir owned by me:httpd which is child of a directory owned by
httpd:mygroup - in neither case rights for others.
> Also remember what happens when a hard link is created in the
> directory... The file changes ownership. That will then change the owner
> of ANY file on the filesystem. I believe this can happen with sgid
> directories too
good point to pay attention to, but you are wrong
> > You don't! You just let it to the users to give access to there files
> > to whomever you want. My case is similar.
>
> NOT the same situation. The OWNER of the file gives ACCESS to files.
I coudl set up a cronjob which copies the files in the directories and
deletes the originals. It's the same, just delayed.
Anyway, when I find time in the next weeks, I will try this patch and post
it. I will do it as a mount option. Nobody is forced to use it ;-)
Michael
--
Hostsharing eG / c/o Michael Hönnig / Boytinstr. 10 / D-22143 Hamburg
phone:+49/40/67581419 / mobile:+49/177/3787491 / fax:++49/40/67581426
http://www.hostsharing.net ---> Webhosting Spielregeln selbst gemacht
next prev parent reply other threads:[~2002-05-20 21:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-18 8:34 suid bit on directories Michael Hoennig
2002-05-18 8:52 ` Cedric Ware
2002-05-18 10:34 ` Michael Hoennig
2002-05-19 1:12 ` jw schultz
2002-05-20 13:04 ` Jesse Pollard
2002-05-20 13:24 ` Michael Hoennig
2002-05-20 14:03 ` Jesse Pollard
2002-05-20 14:53 ` Michael Hoennig
2002-05-20 18:12 ` dean gaudet
2002-05-21 17:48 ` Bill Davidsen
2002-05-20 19:28 ` Jesse Pollard
2002-05-20 20:58 ` Miquel van Smoorenburg
2002-05-20 21:15 ` Michael Hoennig [this message]
2002-05-21 18:03 ` Bill Davidsen
2002-05-22 4:44 ` Michael Hoennig
2002-05-21 3:49 ` Dax Kelson
2002-05-20 15:53 ` Bill Davidsen
2002-05-20 19:17 ` Albert D. Cahalan
2002-05-20 20:17 ` Jesse Pollard
2002-05-21 3:28 ` Dax Kelson
2002-05-21 3:58 ` Dax Kelson
2002-05-21 18:04 ` Bill Davidsen
2002-05-21 18:35 ` J Sloan
2002-05-20 15:42 ` Bill Davidsen
-- strict thread matches above, loose matches on Subject: below --
2002-05-21 13:34 Jesse Pollard
2002-05-21 13:34 Jesse Pollard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020520231526.12e24b48.michael@hostsharing.net \
--to=michael@hostsharing.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pollard@tomcat.admin.navo.hpc.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox