Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-20-2009, 09:33 PM   #1
LQ Newbie
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
Permissions for php script writing to directory

If an "other" user is trying to access a php page through their web browser, and this php page writes a text file to a directory "/www/mydirectory". Does this directory need to have its perrmission set to writeable?

Thank you.
Old 06-20-2009, 09:48 PM   #2
Registered: Mar 2009
Distribution: CentOS - Ubuntu - Debian
Posts: 83

Rep: Reputation: 27

When some user access the php script, such process is run
with the uid of the apache/httpd process always, CentOS
for example has user 'apache' for the default pages,
other distros uses 'httpd','www' or something similar.

There is no difference if the user access your script
from the same machine or from another machine through
the network, the process is always executed with the
'apache' uid.

If your script needs to write some information, it needs
write permissions to the directory for the "apache" user.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permissions for file uploading script in php emab Programming 7 08-31-2008 06:53 AM
php and bash script permissions paddyjoy Programming 2 10-04-2006 06:01 PM
php connect "active directory" script paul_mat Linux - Software 3 08-03-2006 03:24 AM
LXer: Title: PHP/MySQL Classifieds Script AddAsset1.php Script Insertion LXer Syndicated Linux News 0 07-02-2006 06:21 PM
php connect "active directory" script paul_mat Linux - Software 0 05-03-2006 08:01 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration