[Wylug-discuss] 777 access on an images directory
Phil Driscoll
phil at dialsolutions.co.uk
Fri Oct 12 17:48:45 BST 2007
On Friday 12 Oct 2007, Mike Goodman wrote:
> Phil Driscoll wrote:
> The Bytemark forum contributor, final paragraph, wrote:
> > the programs would still have to have the execute bit set for them
> > individually, and you'd have to be in an environment that allow command
> > execution (ie some kind of shell) for that to happen
>
> Is that piffle? This is what I am failing to understand. Is it possible
> to make a file within the 777 directory execute, as Phil is saying, or
> not, as Will Parks avers? Indeed he explicitly states:
> > You are thinking perhaps that setting the execute bit on directories
> > means allowing users to run programs within that directory. This is not
> > the case
In the context we are discussing, the execute bit of the file permissions does
not matter a jot. If the webserver is configured to process files ending
in .php through the PHP interpreter, it will do so regardless of the execute
bit setting in the permissions of the individual PHP file.
If a user uploaded and ELF binary executable file, then the execute bit would
control whether or not the program would execute on the server, however, even
with the execute bit set, such a file would not be executed when accessed via
the web server, it's contents would just be downloaded. To execute the ELF
binary, you would need shell like access on the server itself - which would
be pretty easy to organise if you could upload your own PHP files :)
Cheers
--
Phil Driscoll
More information about the Wylug-discuss
mailing list