View Full Version : file and directory permissions
Hey there everyone. I have a question: I want to write a script that will write content to a file. Right now I have the directory that the file is in set at 0777 permissions and the file set at 0666 permissions. But I only want this script to be able to write to my file and my directory, not the whole world. Is there a way to do this? Perhaps to have the script identify a uid or gid or something? Thanks in advance.
thetestingsite
04-30-2007, 03:30 PM
You could use chown() (http://www.php.net/chown) to set the directory to the httpd user group (or whatever user "runs" the PHP script).
Hope this helps.
You could use chown() (http://www.php.net/chown) to set the directory to the httpd user group (or whatever user "runs" the PHP script).
Hope this helps.
It won't let me do this :-( It says I don't have permission.
Valdis
05-30-2007, 08:59 AM
I would like to know ho it's done too... I need to use the apache to allow me the record for the moment...
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.