PHP permissions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

PHP permissions

Post 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.
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

Post by jaymoore_299 »

and I just noticed I get this error message:
chmod(): Inappropriate file type or format in..
User avatar
dethron
Forum Contributor
Posts: 370
Joined: Sat Apr 27, 2002 11:39 am
Location: Istanbul

Post by dethron »

if you can post your code, we can help you more.
Post Reply