...

View Full Version : how to chmod a directory, chmod() doesn't work



o0katz0o
05-03-2004, 01:24 AM
I want to make a script that CHMOD files for users so they don't need to do it themselves. Now when I tried using
chmod("path/to/filename", 0777);
this didn't work, says I don't have permission to do this.
So I chmod the directory to chmod to 777 and that works but then doesn't that chmod everything in that directory into 777?
Also I couldn't find a function that chmod directories.
I would really like it so the user installing this script wouldn't need to chmod anything, or if it had to chmod one thing, make it a file and not a directory.

what can I do? :confused:

sir pannels
05-03-2004, 12:16 PM
So I chmod the directory to chmod to 777 and that works but then doesn't that chmod everything in that directory into 777?



No - it shouldnt.. it should just chmod the dir.. no files or subdirs within it.
what you have their should work.. im guessing you just dont actually have permission to do it from http... otherwise - if you had the wrong code.. it would bring you back an error... check it out in your hosts faq :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum