how to php can modify atribut folder from chmod 0755 to 0777

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
o_glek
Forum Newbie
Posts: 2
Joined: Wed Sep 03, 2008 2:52 am

how to php can modify atribut folder from chmod 0755 to 0777

Post by o_glek »

i cann't work it with function chmod aplly to folder
ex: chmod($folder,0777)

that's cann't work

how to be work correct ?
:banghead:
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: how to php can modify atribut folder from chmod 0755 to 0777

Post by onion2k »

Odd. It should work on a folder. Of course, it won't recurse through all the files and subdirectories in the folder. You'll have to write some code to make it do that if that's what you want.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: how to php can modify atribut folder from chmod 0755 to 0777

Post by JAB Creations »

Really 777 is great number and all but I've read that it's too liberal a permission many times before. I would test out the minimal permissions you need to achieve your goal and then use that as the CHMOD number to go with.
o_glek
Forum Newbie
Posts: 2
Joined: Wed Sep 03, 2008 2:52 am

Re: how to php can modify atribut folder from chmod 0755 to 0777

Post by o_glek »

hmmmm some webhost, cann't create file with chmod folder with 755, so i set my folder with 707 from ftp before i was created. that's can create file but after that's file was created i will modify with php code into 755.
that's can work, any thread other code chmod ? :roll:
Post Reply