"Chris" <[EMAIL PROTECTED]> escreveu na mensagem 
news:[EMAIL PROTECTED]
> João Cândido de Souza Neto wrote:
>> Hello everyone.
>>
>> I have got some parts of my system where some files are sent and i use 
>> ftp functions to save suche files.
>>
>> When i run it in my local machine, it works fine but, when it is on the 
>> server i got some errors.
>>
>> I was using ftp_put to copy such files from upload_temp folder of php to 
>> my system own folder and it does not work, i thought it could be because 
>> the ftp user has no permission in upload_temp folder of php.
>
> Most likely. ftp users are usually locked in to their own home folders and 
> can't access any other parts of the system. It's simply a security thing.

I agree.

>
>
>> Then i tried to use php_chmod to give permissions for the apache user, 
>> move_uploaded_files to move such file and ftp_chmod agais to remove 
>> permissions. It does not work too, i think it is because the server has 
>> safe_mode on.
>
> chmod will be affected by safe mode (please read the documentation):
>
> When safe mode is enabled, PHP checks whether the files or directories you 
> are about to operate on have the same UID (owner) as the script that is 
> being executed. In addition, you cannot set the SUID, SGID and sticky 
> bits.

It means that the UID (owner) of the folder ought to be the apache user or 
the ftp user?

>
>
> move_uploaded_file will always fail because the file isn't uploaded 
> through a form. The documentation makes this rather clear (see also 
> is_uploaded_file).

The file realy was uploaded by a form and it is in the temporary upload 
folder of php.


>
> -- 
> Postgresql & php tutorials
> http://www.designmagick.com/ 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to