Re: [PHP] Uploading files / processing with a PHP script



On Sun, October 8, 2006 2:49 pm, Larry Garfield wrote:
The owner of a file can change ownership of the file, too, I believe,
essentially "willing" it to someone else.

I sure hope not...

Cuz then I could chmod 4777 a file to make it execute as owner, then I
could "will" it to 'root' owner, and then I am root.
[4### is how you make it "run as user" right?...]

Actually, at that point, as it's chmod 777, *every* user on the
machine is 'root' as they can cram whatever they want into that file.
Total chaos ensues.

That would be bad. :-) :-) :-)

A better solution is to set the file's group permissions to 7, then
chown the
file to apache:mygroup, then put both apache and your ftp user into
the
mygroup group.

This is a Good Solution, however, and probably most closely resembles
the real-world need: www and rpiggot need to be in a common group of
users with access to this file.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
.



Relevant Pages

  • Re: scp in unattended batch mode
    ... LRW> covered I chmod 777 recursively the entire user's directory on ... root. ... Richard Silverman ...
    (comp.security.ssh)
  • Re: What do these file permissions mean ---Sr-x--T ?
    ... This was 'chmod 5050' which is quite unnecessary. ... no permission, but were this to be run as a _binary_ executable, it should ... change the file is the owner root. ...
    (alt.os.linux.redhat)
  • Re: chmod and directories
    ... > I know that chmod 1777 on a directory will set the sticky bit and cause only ... > the owner or root to be able to link or overwrite the files contained ...
    (comp.unix.questions)
  • Re: Howto question
    ... > chmod 755 filename ... > You need to be root for this ... you need to be the owner of the file for this. ...
    (alt.os.linux)
  • Re: Possible system breach due to an improper command
    ... As stated in anther thread this is a very silly use of chmod. ... lock you out of your own home directory and will ... try to lock the directoy one level up as well. ... ]Well, the next thing I know I am out of my locked shell and in root, ...
    (comp.unix.admin)