Hot answers tagged

9

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


9

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


8

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


7

Disclaimer: You don't need to use -i for this. It's for private key file authentication. Just use -r to copy the source files recursively. You might want a drag and drop method since you're using Windows. You can - for example - use WINSCP client.


7

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.


7

To install additional modules you must compile nginx from source. Download and extract source of nginx (download links) Download and extract source code of desired module's (revision) Compile nginx with module Actual commands should look something like this: wget -P /tmp http://nginx.org/download/nginx-1.6.2.tar.gz tar -zxvf /tmp/nginx-1.6.2.tar.gz -C /...


6

Probably nginx upstream timeout needs to be increased. Try adding below to your upstream conf. proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600;


6

You may want to consider that S3 is not the right solution for you. Those files must be uploaded individually to S3, so there's no way around the costs you're experiencing. You can consider one of the lower storage classes, which will help your GB/month costs, but they will not make data ingestion any cheaper.


5

This finally worked doing something like this: location / { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-Protocol ssl; proxy_connect_timeout 120; proxy_pass http://localhost:8000/; ...


5

If /admin/upload path is virtual, it is possible to make it work as follows: location / { try_files $uri /index.php?$args; } location /admin/upload { client_max_body_size 256M; include inc/php.conf; rewrite ^(.*)$ /index.php?$args break; } location ~ \.php$ { include inc/php.conf; } Not the prettiest too, but works.


4

You're running out of inodes. You can verify this by running $ df -i. As far as I know, there's no way to increase the number of inodes on an already-existing filesystem. You can, however, specify a higher number of inodes at fs creation time using the -N flag for mkfs.ext4.


3

It is not a protocol feature. SFTP (as a subprotocol/subsystem of SSH) doesn't decide whether to overwrite your files in-place or through a temporary file, the server only performs the commands that are sent in by the client. So this entire matter should be seen from a client-side perspective. Now, this said, and keeping the above in mind, depending on the ...


3

You need to pip install filechunkio, then use the --multipart option of s3put.


3

cd {local_dir} lftp {server} cd {remote_dir} mput {local_dir}/* This worked for me, many other attempts were failing. Once in lftp, more info available via: help mput


3

Define two php locations? location ~ ^/admin/upload/.+\.php$ { client_max_body_size 256M; include /etc/nginx/conf.d/php-fpm.conf; } location ~ \.php { include /etc/nginx/conf.d/php-fpm.conf; } Perhaps not the prettiest... Should be functional though..


3

If you're using NGINX or other proxy server, it may be related to it's client_max_body_size directive. To fix it create folder .ebextensions in app root, and a file .ebextensions/01_nginx.config. Then tell build script to add this directive while building your environment, adding this to your created .ebextensions/01_nginx.config: container_commands: ...


3

How could you improve upload performance by making nginx buffering to the disk? Every time bytes are received (limited by the MTU of the transmission is the best case, or in the worst case with 1b-payload network packets), those will be written to the disk. Usually one tries to avoid requesting accessing loads of times to the disk, since it is a slow device.....


3

Finally i found the solution. The problem was about Fastcgi_param in nginx.conf file. it was about a \n between two PHP_VALUE and the right expression is like this: fastcgi_param PHP_VALUE "upload_max_filesize = 200M \n post_max_size=200M"


3

Sounds like Qos (Quality of service) needs to be implemented. Depending on where your OpenVPN set up is configured (local, device behind the router, or on the router itself) and if the other people saturating the connection are also using the VPN connection, either your router or VPN device will need to have QoS applied to it.


3

You are probably using a vulnerable application (maybe an old version of Wordpress, old themes, outdated plugins..., just guessing) and someone is using such a vulnerability to upload promiscuous files and abuse your server / services. You should update everything. Or you may have a vulnerable service (do you have root access to your server? Do you update ...


3

The problem was the reverse proxy. In the http block was another client_max_body_size set to 1m. Setting it to 0 solved it. Found the solution here: https://serverfault.com/a/401732/393856


3

https://cloud.google.com/blog/products/gcp/5-steps-to-better-gcp-network-performance?hl=ml Outbound or egress traffic from a virtual machine is subject to maximum network egress throughput caps. These caps are dependent on the number of vCPUs that a virtual machine instance has. Each core is subject to a 2 Gbits/second (Gbps) cap for peak performance. ...


3

Assuming you have network access between both machines, use RSYNC. There is a version for Windows as well.


2

It is a two-step procedure: Import the mbox file into a local email folder Then move (or copy) the newly imported emails to the imap folder In my case I used Mozilla Thunderbird with the already mentioned ImportExprtTools addon. The latter supports importing mbox file into local folders. The former supports moving emails from one email-account to another, ...


2

Apache doesn't seem to be able to do this. However, you can set the limit high globally for Apache or php-fpm and use nginx with proxy_pass or fastcgi_pass and set the per-url limit using nginx client_max_body_size directive in separate locations: location / { client_max_body_size 1M; try_files NOT_EXISTS @proxy; } location = /upload.php { ...


2

If the server is running IIS 6 then it is a Windows server, so the 777 permissions may not apply as that is a Unix/Linux permissions setting. On a Windows server, you may need the Administrator to log in to Windows, right-click the folder you are trying to run a mkdir() command within, and use the Permissions option to ensure the user your PHP script is ...


2

DO NOT DISABLE TCP CHECKSUMS. Your TCP stack should automatically handle recovery albeit that this will drag down the throughput of the network. If you can reproduce the same fault then there is a very serious defect in the TCP stack of the sending or receiving machine or something in between. Have you run wireshark at both ends? Have you got TCP ...


2

These RHEL repositories can be installed using yum utility. A good feature is to enable another repository from your own DVD installation disc. A complete step-by-step description can be found here. http://saifulaziz.com/2014/02/26/howto-install-redhat-package-with-yum-command-without-rhn/ Once you did it, you can install automake, or autoconf from this "...


2

The temporary file location seems to be set by the scripting program that you choose. In PHP, for example, the temporary upload location is set by the upload_temp_dir directive. upload_temp_dir = /somewhere/else As far as Ruby on Rails goes, I found this ServerFault question that describes it as a change to the 'tmpdir' property of Rails' initializer ...


2

FYI the php.ini file says: ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ; http://php.net/upload-tmp-dir ;upload_tmp_dir = so its 'tmp' vs 'temp'. This at least worked for me.


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