Re: copy + chmod problems ...
| From: | jeremy rotsztain | Date: | Thu, 07 Feb 2002 15:50:38 +0000 |
| Subject: | Re: copy + chmod problems ... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83858@lists.php.net to get a copy of this message | ||
hi mike ...
actually, this was my first mistake ... i received this chmod error because
i entered the command into the unix terminal window using osx.
i tried later to change the permissions using php (a script), but was unable
to do so:
$chg = chmod ("photos", 0777);
error message ==> chmod failed: Operation not permitted in
/Library/WebServer/Documents/browsin/copy.ph
i'll try using the full path ... thx jeremy
> i just tried a test and it works on MacOS X. even with the space between
> 'chmod' and '('.
>
> what platform are you on? is this a standalone script/app or from a web
> page? can you perform the chmod from the command-line? what is the entire
> error message?
>
> also, the error doesn't really suggest this, but have you tried using the
> full path?
>
> on 2/7/02 8:07 AM, jeremy rotsztain at downdisk@hotmail.com wrote:
>
>> hello,
>>
>> i'm attempting to copy a file from its original location to a new folder ...
>>
>> $oldfile = "files/adamsCampbells.swf";
>> $newfile = "photos/adamsCampbells.swf";
>>
>> $test = copy($oldfile, $newfile);
>>
>> however, in doing so, i'm encountering some problems:
>>
>> Warning: Unable to create 'adamsCampbells.swf': Permission denied
>>
>> i've been trying to change permissions so that i can copy the file, but i'm
>> encountering some errors
>>
>> chmod ("files", 0777);
>> Badly placed ()'s.
>>
>> does anybody recognize any problems with my approach or have any advice?
>>
>> dnke,
>>
>> jeremy
>>
>>
>>
>>
>
>