LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   vsftpd issue (https://www.linuxquestions.org/questions/linux-networking-3/vsftpd-issue-4175413302/)

z01krh 06-25-2012 12:54 PM

vsftpd issue
 
I have a Ubuntu 12.04 server set up with vsftpd.
I can ftp to it from a client like FileZilla without any problems.
When I do it from a script on another server(redhat) it gets permission denied. Why can Filezilla do this yet my script can't. Filezilla defaults to passive mode and logs in fine.

ftp_file.sh /home/arch/ /tmp/backup.tgz
Connected to xxx.xxx.xxx.xx (xxx.xxx.xxx.xx).
220 (vsFTPd 2.3.2)
331 Please specify the password.
230 Login successful.
250 Directory successfully changed.
local: /tmp/backup.tgz remote: /tmp/backup.tgz
227 Entering Passive Mode (xxx,xxx,xxx,xx,241,10).
550 Permission denied.
221 Goodbye.


Code:

HOST=xxx.xxx.xxx  #This is the FTP servers host or IP address.
USER=adsdf      #This is the FTP user that has access to the server.
PASS=######  #This is the password for the FTP user.
remote_dir=$1
file_name=$2

ftp -inv $HOST <<EOF
user $USER $PASS
cd $remote_dir
put $file_name
bye
EOF


z01krh 06-25-2012 01:54 PM

solved my own issue.
forgot to turn on write enabled
sudo vi /etc/vsftpd.conf
# Uncomment this to enable any form of FTP write command.
write_enable=YES


All times are GMT -5. The time now is 06:15 AM.