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.


3

You could try the following in vsftp.conf:- anon_other_write_enable=YES The man page says:- If set to YES, anonymous users will be permitted to perform write operations other than upload and create directory, such as deletion and renaming. This is generally not recommended but included for completeness.


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

In spite of its name it supports FTP. The name VSFTPD stands for "Very Secure File Transport Protocol Daemon". abstract The FTP (File Transfer Protocol) is used as one of the most common means of copying files between computers over the Internet. Most web based download sites use the built in FTP capabilities of web browsers and therefore most server ...


2

After about 3 hours, I think I figured out why it is not working. Selinux context public_content_t is required for files shared via an FTP server, unless associated with a user home directory and looks like /var/ftp/pub does not qualify for home directory. After I mounted ISO file, the security context of rhel changed to system_u:object_r:iso9660_t:s0 and ...


2

You can install lftp from CentOS repository: sudo yum install lftp The best way to learn how to transfer files is reading man lftp


2

libcurl does not support the rsync protocol. From the libcurl FAQ: Section 3.21 3.21 Protocol xxx not supported or disabled in libcurl When passing on a URL to curl to use, it may respond that the particular protocol is not supported or disabled. The particular way this error message is phrased is because curl doesn't make a distinction ...


2

The command ftp put /path/to/local_file doesn't work with vsftpd. Try the following: ftp put /path/to/local_file remote_file_name You may choose any name you wish for the remote_file_name, but you must specify one.


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

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

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

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' ...


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


1

As long as your system is up, the script will keep running, it will not stop as long as you don't log out of the system. Locking your screen will not stop the script.


1

Exactly the same thing happened to me after upgrading from Precise Pangolin to Trusty Tahr. I investigated and it looks like /etc/vsftpd.conf, the FTP configuration file, was one of the configuration files amended during the upgrade. Specifically, this line: write_enable=YES which I had previously uncommented was now commented again. I uncommented it, ...


1

I would use SCP instead of FTP. SCP is more secure, and a part of SSH. As long as your public key is in the external hosts authorized_keys-file, then you can just do something like: scp -r kmpy/unica/Campaign/partitions/partition1/CiktiDosyalar/ sms@10.113.68.50:/sms/ Some reason why you chose FTP?


1

I am using ubuntu and had same issue Solution: add-shell /sbin/nologin sudo usermod -s /sbin/nologin ftpme sudo vi /etc/pam.d/vsftpd Then comment and add lines as following #%PAM-1.0 session optional pam_keyinit.so force revoke auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed auth required ...



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