New answers tagged

0

add a guestuser option to the ftpaccess file in the /etc directory


2

SSHFS lets you mount a remote filesystem on your local machine. It relies on SFTP as the communication protocol, so if the server allows SFTP, you can use SSHFS. Your client machine must support FUSE which is the case of most modern Unix variants, including Linux, OSX, *BSD, and Solaris. mkdir myserver sshfs username@server.example.com:/path/to/directory ...


1

You could get a different client. For instance with lftp (lftp sftp://user@host/dir): glob eval -f 'get "$0"' file_0722_* However, you cannot use that if file names may contain backslash, double quote or newline characters. If you don't have control over the names of the files, then it becomes a command injection vulnerability (for instance, a file named ...


3

There is (obviously) manual page for vsftpd.conf, which is always a good place to start. TLDR version: They should be needed only for passive mode of FTP. pasv_enable Set to NO if you want to disallow the PASV method of obtaining a data connection. Default: YES pasv_address Use this option to override the IP address that vsftpd ...


0

You need to chown /mnt/inbound folder to the root account and then create other users folders same as their names in the inbound folder and give them full rights to them. You can use chroot option so each user will only have it's own folder and can't go up. But you can't have common upload folder using that solution.


0

The below mentioned redirection is working fine now. I didn't add anything new. /usr/bin/expect<<EOD > ${LOGFILE} set timeout 60 spawn sftp $ES_SFTP_USER@$ES_SFTP_HOST:$R_LOCATION expect "*?assword:" send "$password\r" expect "sftp>" send "put /opt/AppServer/ES_billing_report/todays_report/*.txt\r" expect "sftp>" send "bye\r" expect EOD ...


0

It looks like LOGFILE is out of scope, did you export it. See environment variables. You need to export a variable to the environment, or pass it as an argument. e.g. Let us say your program is called abc then do: LOGFILE=./logdir/logfile export LOGFILE ./abc or LOGFILE=./logdir/logfile ./abc Alternatively, pass as argument: ./abc "./logdir/...


0

Right I managed to get some advice at #openssh IRC channel and here is what was missing from my solution: The directory specified in ChrootDirectory must be owned by root. Since in the above sshd_config file I have specified the %u variable so every user has their own root directory base on their username (e.g. testuser would be /mnt/inbound/testuser/) then ...


0

Hope this helps you: #!/usr/bin/expect spawn sftp USERNAME@ip_address:/path/to/folder expect "Password:" send "PASSWORD\n" expect "sftp>" send "put file1\n" expect "sftp>" send "bye\n" or if you don't want to dedicate the whole script to expect: #!/bin/sh expect << 'EOS' spawn sftp USERNAME@ip_address:/path/to/folder expect "Password:" send ...


0

If I am understanding correctly I have found that some SFTP servers don't support ssh keys and therefore rsync won't work (reports.paypal.com as an example). In that case you'll need to script doing the sftp thing, you can use expect for this... Here's a script that should work for you: #!/bin/sh bname=`basename $0` usage () #usage instructions { cat &...


0

echo "Sending files to destination" USER='(username)' PASSWD='(********)' sftp user@ip_address << EOF quote USER $USER quote PASS $PASSWD cd path put file1 bye EOF


-1

echo "ftping files to destination" USER='(username)' PASSWD='(********)' sftp user@ip_address << EOF quote USER $USER quote PASS $PASSWD cd path put file1 bye EOF


2

You can use rsync command for this kind of operations. How to use rsync to sync with a remote system Syncing to a remote system is trivial if you have SSH access to the remote machine and rsync installed on both sides. You need to set up SSH keys, it's well described how to do it here: https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-...


0

Do you have an entry for user1 in your /etc/passwd ? If you want to change the ownership of the directory you can type as root: chown apache:apache /var/www -R You can also add user1 to apache group and in this way your web server will fine. Maybe it's good idea to read the following topic: How can I create an SFTP user in CentOS?



Top 50 recent answers are included