Home > Archive > PHP Programming > June 2006 > Unix permissions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Matthew Augier \(dps\) 2006-06-26, 6:59 pm |
| I have a folder which I store php generated images in. The app only seems to
function when I have the rights set to 0777, but I don't understand why I
need "execute" to read/write a PNG file. What am I missing?
Mat
| |
| Malcolm Dew-Jones 2006-06-26, 6:59 pm |
| Matthew Augier \(dps\) (Matthew@dps.uk.com) wrote:
: I have a folder which I store php generated images in. The app only seems to
: function when I have the rights set to 0777, but I don't understand why I
: need "execute" to read/write a PNG file. What am I missing?
execute on a unix folder allows you to do wild card searches.
I assume the script is doing a wild card search on the png file name.
Perhaps, for example, it looks for any one of a gif, png, or jpeg, and
displays which ever one it finds. Perhaps (again for example) when it
creates a file then it deletes any existing copy with the same name no
matter what type it is, i.e. hello.png would replace hello.gif.
$0.10
| |
| Gary L. Burnore 2006-06-26, 6:59 pm |
| On 26 Jun 2006 15:19:32 -0800, yf110@vtn1.victoria.tc.ca (Malcolm
Dew-Jones) wrote:
>Matthew Augier \(dps\) (Matthew@dps.uk.com) wrote:
>: I have a folder which I store php generated images in. The app only seems to
>: function when I have the rights set to 0777, but I don't understand why I
>: need "execute" to read/write a PNG file. What am I missing?
>
>execute on a unix folder allows you to do wild card searches.
To be more specific, the x on directories means search, not execute.
It means you can search. (Do an ls for example) wildcards not
withstanding. Without the x, you can't ls /dirname/filename and see
a result but you can get to the file /dirname/filename with an editor
or viewer for example.
For web engines like apache and Netscape, the search is required for
the application to access the directory.
The best thing to do is set the directory to 755 (drwxr-xr-x) or at
minimum 775 (drwxrwxr-x).
The first group of three after the dir identifier (the first
character) mean user, the second three are group and the last three
mean everyone else (or other or world). So drwxr-xr-x means The owner
of the directory can write files into the directory and group and
other can search and access those files. (x = search, r = access).
--
gburnore at DataBasix dot Com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
Official .sig, Accept no substitutes. | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ 0 1 7 2 3 / Ý³Þ 3 7 4 9 3 0 Û³
Black Helicopter Repair Services, Ltd.| Official Proof of Purchase
========================================
===================================
|
|
|
|
|