Tag Info

Hot answers tagged

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


13

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

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.


8

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


7

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


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

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

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


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

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

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

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.


4

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


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


4

I called Godaddy. Max upload size that Godaddy allows on shared hosting is 192MB. I would need to get a dedicated server or possibly go with a different provider.


4

In response to your comment: Your comment is valid if the data I want to protect is some kind of business deeds with sensitive financial figures. But, consider I am doing it for a software company that wants to protect their programmers to upload their software source files to their private cloud storage (they are usually 1000+ files). and your ...


3

Keep in mind that this is a serious security risk, so you definitely want to do this in a restricted environment, running under a restricted shell or for chrooted accounts only. @Kimvais suggestion of scponly is on the right track. In the client create a .ssh/id_rsa key with an empty passphrase -- this will create an unencrypted private key. Then copy the ...


3

That's a pretty general question. A general answer would be "fast" :-) To put some real world numbers on it we have a 100 Mb/sec circuit going to our rack at our data center. I have run tests to servers around the internet and I have seen both my download and upload speeds peak out at over 94 Mb/sec. So to really answer you question, it's whatever speed ...


3

Most enterprise datacenters have you purchase bandwidth from them as part of the hosting package. As such you are guaranteed your bandwidth (unlike shared hosting sites where you are more likely sharing it with everyone else) but also are limited to what you've contracted for. Most will also have bursting agreements where you can use additional bandwidth ...


3

You can use WinSCP to perform this kind of automatic upload. It's normally used with SFTP or SCP but it supports plain FTP as well (your server may actually be capable of SFTP or SCP) and this can be automated with their automation scripting: WinSCP Automation Guide The specific command you're looking for is keepuptodate: ...


3

Everyone who recommends checking file extensions as a way to make sure you're safe is insane. It's easy enough to rename an exe or an mp3 to a gif. Ditto for the upload MIME type. The only way to be sure of the upload type is to parse it; look for the file signatures within the file, load it into an image processor and see if it chokes, etc. etc. What else ...


3

If you are needing to throttle your own applicatino then I would suggest you include daat rate limiting support in the application itself, though if you are using a 3rd party library to do the sent this may not be possible. You don't state anything about your platform and intended install environment making specific recommendations difficult, but libcurl ...


3

You could use vsftp (very secure and fast ftp-server) and setup a "secure FTP Dropbox" the relevant config parameters are: local_enable=YES write_enable=YES nopriv_user=ftp anonymous_enable=YES anon_upload_enable=YES chown_uploads=YES chown_username=inftpadm ftp_username=inftpadm local_umask=002 anon_umask=007 file_open_mode=0666 dirlist_enable=NO ...


3

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


3

You don't need to download it. Just open up notepad and paste the following into the file: X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* Then, save it as whatever file you want. You'll probably need to temporarily turn off your AV to handle the file though.



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