LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   php/ftp overwriting files.. prob. (https://www.linuxquestions.org/questions/programming-9/php-ftp-overwriting-files-prob-301107/)

collen 03-13-2005 11:30 AM

php/ftp overwriting files.. prob.
 
i'm setting up an intranet with a php-ftp connection to up and download files.
it works fine, except for the following:

the idea is not to beable to overwrite files..
so how can i setup an ftp connection, witch probit overwriting files.?
but will be able to write new files..

i use vsftpd and php 4.3.8.
now i do a simple 'ftp_put' to upload the files..

i didn't find anny good intel on howto disable overwriting.
it doen't matter to disable it on ftp-server or with php, both are ok?
does someone know how to pull this off..?

Thx
Collen.

keefaz 03-14-2005 05:56 AM

You could set the permission of the files to read only with
PHP Code:

ftp_site($conn'CHMOD 0444 /path/to/file'); 



All times are GMT -5. The time now is 03:00 PM.