Tag Info

New answers tagged

0

Adding to the previous answer (sorry not enough rep to add a comment) you can certainly block those ports (either on the machine or on a firewall on the way out)... but what if the connection is attempted using a non-standard port? If you want to be truly paranoid, you can go the route of blocking all outbound traffic, and then taking the laborious path of ...


0

Using iptables iptables -A OUTPUT -p 21 -j REJECT # FTP iptables -A OUTPUT -p 22 -j REJECT # SFTP et.al. Do be aware that sftp uses port 22, which is also used by ssh. If you want the process to be unaware then change the REJECT to DROP. The rule above is obviously on the machine that you want to block. If you are configuring the rules on a ...


0

I'm guessing, but it looks like you want to block connections to port 21 and port 22 . This can be done on the host itself for ftp iptables -I OUTPUT -p tcp --dport 21 \ -d the.rem.ote.ip \ -m comment --comment "blocked as per ticket##" \ -j REJECT SFTP, though, is tricky: it shares a port with ssh. If you are okay with blocking the outgoing ssh ...


0

You may use VSFTP instead of SFTP, in VSFTP you can customize your root dir without any change in the /etc/passwd. If you modified in the passwd file, it will also affect when login. If you got permission denied when change your home dir to /, you need to check the permission of / first. Make sure others have read permission like below: # ls -ld / ...


0

Here are steps to setup a user and allow the user access only via FTP (i.e. no SSH) and also limit access to a specific (user home) directory on proftpd: Add new user: adduser newusername Set password: passwd newusername Modify user home directory from default to a new folder: usermod -d /target/directory username Edit shells file: vi /etc/shells and add ...


0

SOLUTION - I got this script to work. thank you for all the support you gave, If i have enough time to be working on this i'll keep trying the other options and make them work as well. #!/usr/bin/python import os from ftplib import FTP local_path='/path_to_local_files/' os.chdir(local_path) ftp = FTP(host='server_name_or_IP',user='username', ...


0

You do keep the "old"er files on the source ftp, don't you? If this is the case, the perfect tool to update/sync your local directories would be lftp, which features a mirror command: lftp -e 'mirror remoteDir localDir;exit' -u 'remoteUser:remotePassword' remoteHost This would connect to remoteHost as remoteUser using remotePassword, then execute (-e) the ...


0

Adding --disable-epsv switch fixed the problem. A little explanation: I just went through many hours of trying to figure out wierd FTP problems. The way that the problem presented was that after login, when the FTP client attempted a directory listing (or any other command), it would just hang. EPSV is "extended passive mode", and is a newer ...


0

Problem is with the ftp server running on 11.111.11.11 IP address. This hangs forever... ftp 11.111.11.11 First get your ftp server working with a simple ftp client. Likely this will fix your curl command too.


1

Example of 'here' document after creating a ~/.netrc with conections/users/passwords. #!/bin/bash ftp 11.1.1.11 << eof ascii get /tmp/myfile.txt bye eof Pitty you can't use lftp, it's a great client and I don't see any security difference between having your passwords in ~/.netrc or having them in the script if you give it ...


0

Have you looked at rsync? From how I interpret your question, this should accomplish exactly what you want. Here is a description how to setup an rsync daemon to connect without ssh.


0

This appears to be an issue with the firewall blocking port 21 on the VM. After allowing the port through the firewall as instructed here I can connect using FileZilla on my host machine. I am yet to actually see if transferring files is successful though. File transfer is successful after also adding the user I log in as to the group with write permissions ...


0

Use the rename command. rename /a/myfile /a/b/myfile I think most ftp clients use rename, not mv like lftp (as in slm's answer).


0

If curl is available, something like this should work (untested; choose your own timestamp format for date command): curl http://source/image.jpg | curl --upload-file - "ftp://destination/$(date +%F).jpg"


1

A macdef directive, like the others (login, password, etc.), only applies to the machine-headed stanza that it's in. As far as I know, putting a macdef directive before the first machine stanza has no effect, and there's no way to have a macro available before the open command is executed. Your macro will work if you open a connection to the site first: $ ...


1

Using strace ftp on my fedora, it didnt even read ~/.netrc unless I ran it with a hostname on the command line. Also, it didnt recognise the macro until I explicitly added a blank line after it, at the end of file! So try $ ftp ftp.nyxdata.com ftp> $download_nyse_index


0

I used Rahul Patil's suggestion above: chroot_local_user=YES local_root=/home/$USER/www-data user_sub_token=$USER But I couldn't understand why I was only able to log in with one user. Then I found that we couldn't chroot to a root directory (for this case, /home/$USER/www-data) that have a write access. So I remove the write access with: # chmod a-w ...


0

The error message relates to your_local_ filename. You are trying to download 4 to the target /home/brian. However that target already exists - it's a directory.


0

FTP clients aren't particularly good at downloading whole directories. Try using wftp with its useful "-r" option. "-l 0" ensures it isnt limited to 5 levels of directory. wget -r -l 0 ftp://user:pass@server.com/7-1-15_asm/4


0

Did you check the audit logs? I suspect SELinux is preventing your web server from opening up outbound connections to an FTP server. You might need to set the httpd_can_network_connect boolean. Check the audit logs by running (as root, or through sudo): ausearch -m avc -ts recent after attempting to load the web page. You can set the SELinux boolean with ...


1

There are several different FTP servers packaged within Debian, which you can see via: apt-cache search ftp-server One of the most popular servers around is proftpd, and that can be installed upon Debian systems with: apt-get install proftpd Once downloaded debconf will ask if you wish to run the server via inetd, or in a standalone fashion. In general ...


0

Try this apt-get install proftpd



Top 50 recent answers are included