Re: upload problem ...

From: Date: Mon, 25 Jun 2001 14:12:08 +0000
Subject: Re: upload problem ...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9815@lists.php.net to get a copy of this message
At 25.06.2001 09:41, you wrote:
hi, i have a site and need to write a script to upload / download files so the database can be updated / backed up. i've tried setting up an <input type=file ... and this works fine on my machine but php gives an eror onthe server saying that the /php/tmp dir cannot be written to by, i assume, the nobody account within whihc the web server runs. i need to be bale to write to the httpd dir using php and then i can get the db to import the files. i have an ftp username and password but don't know how to get php to pass the authorisation the server. the site is already password protected just using a table of username / passowrds.
Rather than using PHP to do a setuid/setgid (which it can't do IIRC), change the permissions on one of your catalogues to be writeable by the httpd-user, and use that as your /tmp catalogue (/tmp is usually worldwriteable), however be sure that your script cleans up after itself, otherwise you'd slowly fill up the harddrive of the webserver (unless you write the same file evey time).

« previous php.db (#9815) next »