[Phpsig] Permissions, PHP scripts

Wesley Leonard phpsig@kalamazoolinux.org
Sun, 24 Mar 2002 21:12:49 -0500


PHP files need to be readable by the webserver program (apache, IIS, whatever). 
Usually this means they have to be world readable.  

Directories should be world executable and readable.  (execute on a directory
means you can cd into that directory, readable means you can do an ls on that
directory)

If you do chmod -R on a directory it will recursively change the permissions on
the directory and all files and subdirectories inside that directory.  Without
the -R it just does one file (or directory, but we can call it a file since on
UNIX everything is a file).

l8er




Paul VandenBosch wrote:
> 
> I have a PHP script (openautoclassified) that gives me an Internal Server
> Error when I try to run the configurator.php script.  I want to check the
> permissions of files and directories.
> 
> I understand that permissions give the user, group and world authority to
> read, write and execute.  I wonder if someone could explain the difference
> between a permission for a file and a permission for a directory.  If you
> change permission for a directory, does it automatically change all the files
> in that directory?
> 
> Also, for PHP, a server-side program, what permission does the server need to
> execute a PHP file?  What permission does a person calling a file from the
> web need to get a PHP file to run?
> 
> This is not really a critical question, I'm just playing around with scripts
> and patiently waiting for a package from amazon.com with a few PHP books so I
> can start writing my own stuff.
> _______________________________________________
> Phpsig mailing list
> Phpsig@kalamazoolinux.org
> http://www.kalamazoolinux.org/mailman/listinfo/phpsig

-- 
Wesley Leonard

marshall@pacdemon.org                   http://pacdemon.org
marshall@westmichigancomputing.com      http://westmichigancomputing.com

"Rather than form a federation with Microsoft and work with what we had already
created, there was this notion that the world should be offered an alternative." 
    -- Craig Mundie, CTO of Microsoft Corporation