Hallo,
ich habe ein Backupscript das anschliessend das tar.gz per FTP auf einen anderen Server schiebt.
Was ich auch mache (chmod, andere Pfade, etc.) es gibt immer diesen Fehler:
Warning: ftp_put(): Unable to access /root/tools/backup/www.tar.gz in /root/tools/backup/ftp_upload.php on line 15
Google wirft nix wirklich hilfreiches aus, bzw. das hab ich schon getestet. Leider ohne Erfolg.
Weiss jemand die Lösung? Danke.
Befehl ftp_put bringt Fehler
-
- Posts: 5923
- Joined: 2004-05-23 12:53
Re: Befehl ftp_put bringt Fehler
Unter welcher Benutzerkennung läuft das Skript?
Außerdem:
Außerdem:
Code: Select all
ls -ld /root
ls -ld /root/tools
ls -ld /root/tools/backup
ls -l /root/tools/backup/www.tar.gz
-
- Posts: 1132
- Joined: 2003-03-26 23:29
- Location: SA
Re: Befehl ftp_put bringt Fehler
unter rootRoger Wilco wrote:Unter welcher Benutzerkennung läuft das Skript?
Außerdem:
Code: Select all
ls -ld /root
ls -ld /root/tools
ls -ld /root/tools/backup
ls -l /root/tools/backup/www.tar.gz
drwxr-xr-x 4 root root 4096 2006-11-28 22:07 /root/tools
drwxr-xr-x 2 root root 4096 2006-11-29 09:43 /root/tools/backup
-rwsrwxrwx 1 root root 2369738314 2006-11-29 02:47 /root/tools/backup/www.tar.gz
-
- Posts: 1132
- Joined: 2003-03-26 23:29
- Location: SA
Re: Befehl ftp_put bringt Fehler
da hat wohl keiner ne Erklärung?
-
- Project Manager
- Posts: 11183
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: Befehl ftp_put bringt Fehler
Wie und unter welchem User wird das Backupscript aufgerufen?
Code: Select all
chmod 0644 /root/tools/backup/www.tar.gz
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 1132
- Joined: 2003-03-26 23:29
- Location: SA
Re: Befehl ftp_put bringt Fehler
es soll als Cron laufen. Und getestet hab ich es auf der Konsole unter rootJoe User wrote:Wie und unter welchem User wird das Backupscript aufgerufen?
du meinst ... ? Ich teste es.Code: Select all
chmod 0644 /root/tools/backup/www.tar.gz
Edit:
chmod hat nix gebracht.
Jetzt kommt beim Aufruf auf der Konsole:
php ftp_upload.php
Code: Select all
1
ftp_put(Resource id #4,/Backup/www.tar.gz,/root/tools/backup/www.tar.gz,FTP_BINARY)
Warning: ftp_put(): Unable to access /root/tools/backup/www.tar.gz in /root/tools/backup/ftp_upload.php on line 17
Code: Select all
<?
// FTP-Zugangsdaten
$FTP_host = "name.dyndns.org";
$FTP_port = "33388";
$FTP_user = "backup";
$FTP_pass = "geheim";
// Transferdaten
$source_file = "/root/tools/backup/www.tar.gz";
$destination_file = "/Backup/www.tar.gz";
// Transfer:
$conn_id = ftp_connect($FTP_host,$FTP_port);
$login_result = ftp_login($conn_id, $FTP_user, $FTP_pass);
echo $login_result;
echo "nftp_put($conn_id,$destination_file,$source_file,FTP_BINARY)n";
ftp_put($conn_id,$destination_file,$source_file,FTP_BINARY);
ftp_quit($conn_id);
?>