Page 1 of 1

PHP permissions

Posted: Sat Jun 25, 2005 9:26 am
by jaymoore_299
When I change the permissions on a file to 777, then run a php script which changes the value found in the first line of that file and increments it, I find that the permissions on that file has been changed back to 644.

The file is located in the subroot directory, which is the name of the domain (http://www.domain.com), and this directory has permissions 777.

I tried putting a chmod on the last line to change it to 777, but it changes back to 644 anyway. I know that the argument for chmod refers to the correct file because I have been using the same argument for other operations such as copy, file(), fwrite, etc.

In the file I only have php code, no html. The very last line is ?>, the second to last line is that chmod statement.

Posted: Sat Jun 25, 2005 9:28 am
by jaymoore_299
and I just noticed I get this error message:
chmod(): Inappropriate file type or format in..

Posted: Sat Jun 25, 2005 9:31 am
by dethron
if you can post your code, we can help you more.