Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-13-2005, 11:30 AM   #1
Registered: Jun 2003
Location: /
Distribution: Fedora/Debian
Posts: 86

Rep: Reputation: 15
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..?

Old 03-14-2005, 05:56 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
You could set the permission of the files to read only with
PHP Code:
ftp_site($conn'CHMOD 0444 /path/to/file'); 


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
php 4.2 - 4.3 update prob globeTrotter Programming 2 12-10-2004 05:22 AM
PHP +Mysql prob Master Fox Linux - Software 2 10-31-2004 08:43 AM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 12:51 PM
ftp up/download permission prob Stex Linux - Networking 6 10-03-2003 02:23 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 09:23 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration