Click to See Complete Forum and Search --> : chmod prob


Alicia
12-29-2003, 03:52 AM
hi guys,

i wrote a code to chmod a folder but why it deosn't work ??


chmod ("../members/$web_add/images", 0777);
$copy = copy($_FILES['thumbnail']['tmp_name'], "../members/$web_add/images/{$thumbnail_name}");


then this error displayed:
Warning: chmod(): Operation not permitted in /home/local/public_html/web/wc_upload.php3 on line 96

Warning: copy(../members/user/images/logo2.jpg): failed to open stream: Permission denied in /home/local/public_html/web/wc_upload.php3 on line 97


Did i miss something in my code ??? it is troublesome for me to chmod the folders manually when i get more and more folders to chmod..

please advise.

diamonds
12-29-2003, 01:25 PM
it means that you dont have permissions to change the permissions.
i think you need to be an admin? I don't those unix based systems very well.

are you using windows? there is no "chmod" in windows.

Alicia
12-29-2003, 07:28 PM
no, i am using Linux,,,

by the way, if i am using a windows server, do they have folder permission setting code ?? or we need to change the permission manually ?

s|k
12-29-2003, 09:49 PM
Originally posted by Alicia
no, i am using Linux,,,

by the way, if i am using a windows server, do they have folder permission setting code ?? or we need to change the permission manually ?

Are you using Linux or Windows? It's not clear. Windows NT, Windows 2000, and Windows XP have file permissions, but it's not accessible with chmod, at least as far as I know.

Alicia
12-30-2003, 08:02 PM
my host server is a Linux system..

pyro
12-30-2003, 08:11 PM
You will probably have to set the permissions on the directory that the file you are trying to CHMOD resides in...