[bash] ftp upload skripta [riješeno]
Postano: 23 ruj 2010, 20:15
Dakle trebala bi mi jedna skripta za ftp upload na jedan server, recimo riječ je o webkameri i trebam poslati sliku svako 5 min. Sve mi je jasno, napravio sam cronjob ali problem je sto se slika ne salje. Probao sam poslati jedan .txt file ali nece
Evo køda:
A u terminalu dobijem ovo:
Dakle, ftp podaci su ispravni, file postoji, putanja do file je ispravna.... Gdje je problem?
Evo køda:
Kod: Označi sve
#!/bin/bash
HOST='ftp.mojastranica.com'
USER='user@mojastranica.com'
PASSWD='*********'
ftp -n -v $HOST << EOT
ascii
user $USER $PASSWD
prompt
put /home/ante/Desktop/vjezba.txt
bye
EOTKod: Označi sve
Connected to mojastranica.com.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 5 of 100 allowed.
220-Local time is now 19:13. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 60 seconds of inactivity.
Remote system type is UNIX.
Using binary mode to transfer files.
200 TYPE is now ASCII
331 User user@mojastranica.com OK. Password required
230-Your bandwidth usage is restricted
230-User user@mojsastranica.com has group access to: mojastranica
230-OK. Current restricted directory is /
230 211 Kbytes used (1%) - authorized: 20480 Kb
Remote system type is UNIX.
Using binary mode to transfer files.
Interactive mode off.
local: /home/ante/Desktop/vjezba.txt remote: /home/ante/Desktop/vjezba.txt
200 PORT command successful
553 Can't open that file: No such file or directory
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.