Page 1 of 1

Problem creating file and permission

Posted: Tue Apr 06, 2010 10:56 am
by dimxasnewfrozen

Code: Select all

mkdir($creation_dir, 0775);

$index_file    = $creation_dir."/index.php";

$fh = fopen($index_file, 'w') or die("can't open file");
I can make the directory fine. And the file gets created fine as well. I am just wondering how I can create the permission for the file.

Once I create the file, I don't have permission to do anything to it since it's created by the server and server group haha

Re: Problem creating file and permission

Posted: Tue Apr 06, 2010 11:03 am
by dimxasnewfrozen
Bleh nevermind, I got it..

Code: Select all


chmod($index_file, 0775);
chmod($creation_dir, 0775);

had to manually change them as the server user.