Re: uploading to /home/*/public_html on a linux box
> > ==== bash ====
> > make mycp ## make while logged in as username
> > chmod a+s mycp
>
> How is this going to do anything to help him? And what does this have
> to do with PHP?
mycp runs setuid to the owner of the local /home/username/public_html
directory. mycp is installed inside that public_html.
A *PHP* upload script deposits the uploaded file in /tmp/
The *PHP* at the top of the previous post invokes `mycp` with a system
call,
which copies the recently uploaded file in /tmp/ to the local_public
html.....so the copied file belongs to the local owner (as specified)
and so public_html DOES NOT REQUIRE 777 permissions, as originally
specified. That was the requirement, no?
|