Hot answers tagged

19

lftp should be able to do this in one step, in particular with lftp mirror: EDIT: the lftp command syntax is confusing, original invocation I posted doesn't work. Try it like this: lftp -e "mirror -R {local dir} {remote dir}" -u {username},{password} {host} note the comments around the arguments to the -e switch.


14

You should be able to do this using something like: server { server_name example.com; client_max_body_size 10m; # or whatever size limit you want error_page 413 /custompage.html; # you can also use a named location here if you like } http://wiki.nginx.org/HttpCoreModule#client_max_body_size http://wiki.nginx.org/HttpCoreModule#error_page


14

You can use rsync to copy your file from one computer to the other. rsync can use ssh as its underlying transport. Combine rsync --partial with a script such as this one to try again in case of network failure, and you should be able to move your files even in the face of network errors. Another way to do it would be to mount the remote filesystem on your ...


12

Get the EICAR test vector and use that.


11

These should be installable via yum and the base RHEL repositories. Have you tried querying if they are already installed but not in your path? Also, have you successfully installed anything via yum? To check what package you need to install: [user@server]# yum whatprovides autoconf automake Loaded plugins: rhnplugin, security autoconf-2.59-12.noarch : A ...


11

You can use SSH to send and receive files. This is referred to as SFTP. You just need to download an SFTP client, and you would then use the same connection credentials you use for SSH. A good one is WinSCP.


11

Found this bash script online that has quality documentation: #!/bin/bash HOST=ftp.server.com #This is the FTP servers host or IP address. USER=ftpuser #This is the FTP user that has access to the server. PASS=password #This is the password for the FTP user. # Call 1. Uses the ftp command with the -inv switches. #-i turns off ...


11

Two problems: First, the * does not go on the destination side. Second, -r is for copying an entire directory and subdirectories. pscp -i C:\sitedeploy\abt-keypair.ppk includes\* root@mysite.com:/usr/local/tomcat/webapps/ROOT/includes/ Will copy all of the files in the local includes\ directory to the .../includes/ directory on the server. pscp -r -i C:...


8

You can use the "file" provisioner. It seems to be undocumented, but usage is simple. For example: Vagrant.configure('2') do |config| # ... config.vm.provision :file do |file| file.source = '~/.my.conf' file.destination = '/home/vagrant/.my.conf' end end First catch is that it is run as the ssh user ("vagrant" by default) without sudo, ...


8

I assume that by "sftp client" you refer to an OpenSSH SFTP client. The "problem" is that when you press Ctrl+C, it stops the upload and cleanly closes the remote file, just as if the upload completely finished (note that it is a correct behavior and many other SFTP clients behave the same). So the server has absolutely no way to tell that the upload was ...


7

command in one line: ftp -in -u ftp://username:password@servername/path/to/ localfile


6

The command you should use to change the shell is chsh. The nologin shell can be /sbin/nologin or /usr/sbin/nologin (check which you have by looking in /etc/shells) but /bin/false would probably be a better choice. chsh -s /bin/false user You should consider setting up something like scponly which will do exactly what you want.


6

rsync does exactly that in the default transfer mode: it creates a new file on the destination for the duration of the transmission and renames it after the transmission completes. Nontheless, this will not help with situations where your upload is "inconsistent" - i.e. you have uploaded files which depend on other, not yet uploaded files. If this is a ...


5

I'd say the safest solution to this is to generate a password-less SSH-key for each machine and add it to the authorized_keys list on the other. On machine 1 (as the user who's logging on to the other server): $ ssh-keygen -t rsa $ ssh-add ~/.ssh/id_rsa $ cat .ssh/id_rsa.pub If keygen asks you for a password, just press enter to create a password-less ...


5

Do you connect using SSH? If so...use filezilla on your client desktop. No need to install anything on the server. Connect to the server on port 22 (not 21). http://filezilla-project.org/download.php


5

You don't mention your operating systems. I'm assuming you use a flavor of Linux. Linux systems have a CLI utility called 'split' that is expressly intended to break a file into pieces. To reassemble, you just 'cat' the files together.


5

curl is capable of uploading file(s) to FTP servers. curl -T "$FILE(s)" -u $USERNAME:$PASSWORD $SERVER/$DIR/ You can also use a glob pattern for $FILE.


5

We use SFTP/SCP or rsync-over-SSH, but that depends on the client having the relevant client/server software at there end. It goes as fast as out links will allow, with rsync interrupted transfers are restartable, and it is all nicely scriptable (assuming you know your bash/equivalent scripting and related tools) so things can be completely automated. You'...


5

Solution: FcgidMaxRequestLen -->This is causing the problem. Before updating to the newest version, it was default set to 1gb. Now it is 128kb. Add the following to the file /etc/apache2/conf.d/fcgid.conf : FcgidMaxRequestLen 1073741824 This wil give you a limit of 1gb. Next, restart your apache.


4

You need to look out for: Maximum file size. This can be done by the web developers in many cases. Permissions. Do you want each user to have their own (virtual or real) folder that nobody else can see? Do you want users to be able to delete files they have uploaded, or even see them? They should probably be able to verify what files they uploaded at the ...


4

1) Use SSH Public Key Authentication instead of plain-text passwords 2) Your SFTP server should allow you to limit the directories that the logged in user can access. Generally by default this is the user's HOME directory. One neat trick I found is the use of the mount --bind /new/bind/path feature. This will allow you to bind the public directory to ...


4

It is mostly a problem if you have limited ram and multiple users doing uploads at the same time. Both of those are per session, so a user starting a slow upload can eat up quite a bit or resources for you for a long time. If you have over 40 or so users doing uploads/big posts at the maximum size you will run into problems. Otherwise it shouldn't be any ...


4

While this is completely a hack, open up tomcat/bin/startup.sh and set 'umask 0002' in it. You could also do this in catalina.sh, you get the idea - you could even find right where java launches in catalina.sh (search for "catalina.out") and put it directly above that logic block to ensure it's effective when java is let loose on your poor CPU.


4

AFAIK there is no built-in support for webdav in browsers. I think there are applications and AJAX libraries you could run on your web server that would make webdav through the browser possible. A quick google search for ajax webdav showed one interesting looking product (http://www.webdavsystem.com/ajaxfilebrowser). I have never used this, just ...


4

check upload_max_filesize in /etc/php.ini


4

There is almost always an entry recorded as long as it successfully started the request. However, the logs in C:\Windows\System32\LogFiles\HTTPERR will sometimes catch the errors that occur earlier in the pipeline. A timeout is different though and isn't an IIS error, so it should show in the logs. For log file mining, check out Log Parser. Very ...


4

You should also be able to do it with OpenSSH 4.9 and up, with which you can additionally chroot the user for increased security. In your /etc/ssh/sshd_config: Match User user ChrootDirectory /home/user ForceCommand internal-sftp AllowTcpForwarding no Then run: chsh -s /bin/false user chown root:root /home/user mkdir /home/user/uploads chown user /home/...


4

HTTP Error 404.13 means that the IIS7 request filtering module is killing the request because the request is too large. The correct way to increase this is by configuring the maxAllowedContentLength value in the system.webServer > security > requestFiltering configuration section of your site's web.config. For example: <configuration> <...


4

Uploading a file is likely to consume almost no resources on the server. The resources that uploading a file can consume are (in probable, though not definite, order): Your outgoing bandwidth Server's incoming bandwidth Server's disk IO Server's CPU Your outgoing bandwidth is likely the problem when you report that the terminal is being slow (ceejayoz ...



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