chmod problems

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
jiop
Forum Newbie
Posts: 11
Joined: Wed Dec 18, 2002 4:00 am
Location: newport beach

chmod problems

Post by jiop »

i am attempting to change the file permissions of a file so that i can write to it but i am getting the following warning

Warning: chmod() [function.chmod]: Operation not permitted in script.php on line 40

Code: Select all

// line 40
chmod("mydirectory/$a.php", 0666);
i am pretty sure i am using the function right because i checked php.net... is it just that my server does not allow for chmod to be used?

any input or help is appreciated :D
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

This and This. 8)
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

Besure the parent folder of the file is CHMODed to 777.
Image Image
jiop
Forum Newbie
Posts: 11
Joined: Wed Dec 18, 2002 4:00 am
Location: newport beach

Post by jiop »

Thanks for all your help!! It definetely helped solve the problem :D
Post Reply