Tag Info

Hot answers tagged

14

When you define an alias, the command you set is run instead of the one you wrote. This means that when you run ftp abc.com, what is actually executed is echo do not use ftp. Use sftp instead abc.com A simple solution is to use a function instead of an alias: ftp(){ echo 'do not use ftp. Use sftp instead'; } Alternatively, you could use printf as ...


14

alias ftp='echo do not use ftp. Use sftp instead. # '


8

Just put a space and the comment character # at the end of the alias string: alias ftp='echo do not use ftp. Use sftp instead. #' ftp abcd.com do not use ftp. Use sftp instead. This will cause the parameters to be treated as a comment. Just do not forget to add a space before # otherwise it will not be interpreted as a separate token after the alias ...


6

with curl: curl ftp://example.com/ -X 'DELE myfile.zip' --user username:password


5

with lftp: lftp ftp://user:password@host -e "get -E remotefile; bye"


4

There is a program to interact with interactive command line tools exactly like the ftp example: expect. It is a specialized script shell, extending the on the scripting language tcl. It is very powerful, but you may get away without learning everything about it. A very useful tool is autoexpect, which can record an interactive session as an expect script. ...


3

you can use mput * instead of put to upload all of the files in the directory. Further you can screen files, for example: mput *.jpg will transfer all and only jpg files.


2

There are patches for openssh for HPC (High Performance Computing) that improve ssh throughput by increasing transfer window sizes and disabling encryption - if you don't mind recompiling (and probably forward-porting patches), check HPN-SSH. As BowlOfRed noticed in the comment, you'd need to use the patches on both the client and the server. You can also ...


2

I wrote this quick script: #!/bin/bash ssh "$1" "nc -l 2020 > \"$2\" &" pv "$2" | nc "$1" 2020 It takes two args, the host to send it to and the file you are sending. It only works for one file. It uses ssh to start a netcat listening on the opposite end and then uses netcat to send it to that listening port. I added pv to the start to give a nice ...


2

There are several modes with SSL and FTP: Implicit SSL, that is SSL from start (usually port 990) and never plain text. In this case you get no clear text information at the firewall about the dynamic data ports and thus cannot restrict communication to only these ports. Explicit SSL with "AUTH TLS" command before login to enable SSL but without CCC after ...


2

You can use access control lists commands. First set owner apache to the directory sudo chown -R apache:apache /var/www/public_html/a Now set acl so that ftp user can upload folders. FOR USER sudo setfacl -R -m u:yulichika:rwx /var/www/public_html/a FOR GROUP sudo setfacl -R -m g:users:rwx /var/www/public_html/a Hope this will solve your problem.


2

You can use a client that supports the FXP protocol, as described in one of the answers from this webmaster.stackexchange.com Q&A: How can I transfer files from one server to another server using FTP The following is from the SmartFTP Knowledge base: excerpt What Is FXP? FXP stands for File eXchange Protocol. It lets you copy files from one ...


2

Unfortunately, you are using Name Based Virtual Hosting which works because apache reads the HTTP header for the hostname of the client and decides which <VirtualHost> block to use depending on that value. Your block tells it to proxy the request to another server. There is no similar facility in ssh or ftp. The nearest you can get is to use ...


2

Your assessment is correct. From a pure numbers standpoint, the overhead is slowing down the download Use aria2c. Aria2c opens many parallel connections to the ftp server to download a set of files faster. Just be sure that your server supports multiple concurrent connections from the same host Alternatively, if you have write access on your host (in ...


2

Are the users local users or vsftp users ? Try the following: grep local_enable /etc/vsftpd/vsftpd.conf That should be set to YES and the users should log in with local accounts for this to work. If you do not want this or already have this set, please paste your /etc/vsftpd/vsftpd.conf here.


2

You could specify the path on the FTP server after hostname part in the original command of curlftpfs. For example, you could have your command as, curlftpfs user_name:password@hostname:/var/www/public_html ~/mnt/sitename References http://askubuntu.com/a/323215 http://askubuntu.com/a/200812


2

The ftp program is for the insecure ftp protocol. Your vendor has specified that you use Implicit FTP over TLS which is a way to encrypt the connection and keep your credentials and data private over the Internet. Fortunately, there is a program called lftp which understands this protocol. lftp open -u [username] ftps://host.com:46800 Password: [enter ...


2

Windows line endings consist of the two-character sequence CR, LF. CR is the carriage return character, sometimes represented as \r, \015, ^M, etc. A Unix line ending is just the LF character. A way to convert Windows line endings to Unix line endings using only standard utilities present on all Unix variants is to use the tr utility. tr -d '\r' ...


2

According to http://www.proftpd.org/docs/directives/linked/config_ref_DisplayChdir.html the DisplayFirstChdir directive has been obsoleted by DisplayChdir with the supplementary true parameter. So instead of: DisplayFirstChdir .message You now need: DisplayChdir .message true If you want the message displayed every time someone enters that directory, ...


2

You might use lftp instead of the regular ftp client. With lftp you can use mget -E /path/to/files which will delete the source files after succesful transfer. See http://lftp.yar.ru/lftp-man.html for the manual.


1

The -m option of wget is the unlimited recursion -m --mirror Turn on options suitable for mirroring. This option turns on recursion and time-stamping, sets infinite recursion depth and keeps FTP directory listings. It is currently equivalent to ‘-r -N -l inf --no-remove-listing’. Thanks for helping.


1

How many level deep are you getting? If you need more than 5, you need to provide the -l option. man wget -r --recursive Turn on recursive retrieving. The default maximum depth is 5. -l depth --level=depth Specify recursion maximum depth level depth. -m --mirror Turn on options suitable for mirroring. This ...


1

Would the correct approach here be to change the "owner" of the files from what I assume is root to my FTP user? Yes. As root, run chown -R yourftpuser:yourftpgroup /path/to/tree. Your permissions will be fine for FTP at that point. All files will be owned by the FTP user, who has write access¹. In future, you can avoid this by cloning as the user you ...


1

You can use a program like usermod with its -d option if you have that installed: usermod -d /new/ftpuserhome ftpuser if you don't have that, you can also edit the /etc/passwd file as root and change the 6th field (the one before the last field (: is the field separator).


1

Adding local_umask=022 to vsftpd.conf seems to have fixed the problem.


1

Here's how I ended up doing solving this using the advice from others. The NOAA in this case has an FTP and an HTTP resource for this, so what I wrote a script that does the following: ncftpls to get a list of files sed to complete the filepaths to a full list of http files aria2c to quickly download them all Example script: # generate file list ncftpls ...


1

Yes, you are correct. Unfortunately while the ftp specs offer an alternate transfer mode that is capable of piplining multiple files over a single data connection, the last time I did a survey of available software ( which admittedly was back in 1998 ), none supported it. I don't think the situation has changed because interest in ftp has been rather low. ...


1

Sure you can use lsof to see what activity is currently taking place on the server. Here's what the output would look like for an idle connection to an SFTP server. $ sudo /usr/sbin/lsof -p $(pgrep sftp) COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sftp-serv 30268 sam cwd DIR 0,19 20480 28312529 /home/sam ...


1

Use PSFTP, which is part of PUTTY installation (PSFTP.EXE at the same folder). You just enter sftp <your_machine_ip> and then use standard ftp commands to copy/paste files between hosts (put <local_file> do upload, get <remote_file> to download, etc.). But if you want to connect to a shared drive, you probably need to use samba client ...


1

The 'ftp' command does not seem to return other error codes than 0. An alternative solution would be to check the FTP return codes. There is some examples in how to do this here: http://stackoverflow.com/a/4442763



Only top voted, non community-wiki answers of a minimum length are eligible