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


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

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.


10

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


7

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


7

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


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


6

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

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

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.


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


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

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

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

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

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

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

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

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

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.


3

Based on your real goal (I am building a web app where my user will be able to upload epubs files and I want to make sure they are no executable files.) ClamAV is probably overkill for your needs. You can use the file utility (or various APIs that hook the same database of magic data) to determine what kind of file the user is trying to upload, and reject ...


3

It seems to be that mount --bind is the solution I was looking for. There are reasons for and against the usage of ln -s vs mount --bind, but it seems to be common practice to mount a device several times on linux systems (even mounting single files onto other files is encouraged in man mount) and it seems that system stability isn’t seriously affected. ...


3

It depends entirely on the receiving application. Most FTP/SFTP servers would keep the partial file under the assumption that the client will resume the transfer later. SCP is about 50/50 in my experience. I assume because it's a configurable option and different distros have decided on different defaults, but I haven't actually looked in to this. Windows ...


3

scp and sftp will replace the file in-place, so yes, theoretically an HTTP client could try to fetch a partially-uploaded file. You can mitigate this by using rsync over SSH instead of sftp as this will write to a temporary file first and then replace the file. rsync can also be configured to backup any files it replaces.


3

Whether a Perl CGI program gets invoked or not depends primarily on the server configuration and the "path" part of the resource path. The Perl CGI script might return HTML (and usually this is the case). So requesting a script is often effectively requesting an html page, even if the URL doesn't contain ".html". If the URL is, say, ...


3

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


3

check upload_max_filesize in /etc/php.ini



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