Category Archives: Linux

500 Internal Server Error while uploading files

I was having a 500 Internal Server Error…
nginx logs were showing me the following

2016/03/17 12:09:32 [crit] 31488#0: *11192 open() "/var/lib/nginx/tmp/client_body/0000000005" failed (13: Permission denied), client: 84.91.XXX.XXX, server: host.com, request: "POST /trades_edit/edit_trade HTTP/1.1", host: "host.com", referrer: "https://host.com/trades_edit/125"

Solution?

chown -R www-data:www-data /var/lib/nginx

rancherio_logo

What is Rancher?

Rancher is open source software that makes it simple for organizations to deploy a private container service and deliver Docker orchestration to users. Within a team, authorized users are able to create resource pools from any hosts, and then launch containers or application templates from Rancher’s UI or CLI. Users have complete control over how their applications are deployed, and Rancher provides all of the necessary infrastructure services such as networking, load balancing, and storage to ensure the application runs brilliantly on any infrastructure.

service_upgrade

Continue reading rancher.com

Nginx Error – 413 Request Entity Too Large

Got the following error while uploading a WordPress theme.

413

Had to edit /etc/nginx/nginx.conf and add the following line inside http {

client_max_body_size 20M;

then restart nginx

service nginx restart

 

 

Got the following error while uploading a WordPress theme.

413

Had to edit /etc/nginx/nginx.conf and add the following line inside http {

client_max_body_size 20M;

then restart nginx

service nginx restart

CloudFlare Apache Module – Ubuntu 14.04 LTS

If we have CloudFlare active on the domain/subdomain that is protected with IP *validation* we need to install libapache2-mod-cloudflare, so Apache can see the real visitor IP, other way it will see the CloudFlare IP, and we wont be able to access the sub/domain.

authz-error

Step 1

echo 'deb http://pkg.cloudflare.com/ trusty main' | sudo tee /etc/apt/sources.list.d/cloudflare-main.list

Step 2

curl -C - https://pkg.cloudflare.com/pubkey.gpg | sudo apt-key add -

Step 3

sudo apt-get update

Step 4

grep ^Package: /var/lib/apt/lists/pkg.cloudflare.com_dists_trusty_main_binary-amd64_Packages

Step 5

sudo apt-get install libapache2-mod-cloudflare

Step 6

sudo service apache2 restart

 

scaleway-libapache2-mod-cloudflare

 

 

Two terminal-based monitoring tools

nload

nload is a console application which monitors network traffic and bandwidth usage in real time. It visualizes the in- and outgoing traffic using two graphs and provides additional info like the total amount of transfered data and min/max network usage.

Source: http://linux.die.net/man/1/nload

slurm08

Slurm (version 0.4.0) shows network activity for a given interface. Total uploads and downloads are shown together in text and ASCII graphics. Data updates every second by default, and the graph scrolls from left to right according to network usage.

Source: https://delightlylinux.wordpress.com/2014/06/16/slurm-network-load-monitor/

 

Patch and Protect Linux Glibc Getaddrinfo Stack-based Buffer Overflow Zero Day Vulnerability CVE-2015-7547 and CVE-2015-5229

A list of affected Linux distributions

  1. Red Hat Enterprise Linux Server 7
  2. Red Hat Enterprise Linux Server 6
  3. CentOS Linux 7
  4. CentOS Linux 6
  5. Debian Linux 6 squeeze
  6. Debian Linux 7 wheezy
  7. Debian Linux 8 jessie
  8. Ubuntu Linux 15.10
  9. Ubuntu Linux 14.04 LTS
  10. Ubuntu Linux 12.04 LTS
  11. SUSE Linux Enterprise Linux 11
  12. SUSE Linux Enterprise Linux 12
  13. openSUSE Leap 42.1

How to repair: http://www.cyberciti.biz/faq/linux-patch-cve-2015-7547-glibc-getaddrinfo-stack-based-buffer-overflow/

fatal: no matching mac found

One of my clients was trying to connect, for the first time, on his brand new server..
Somehow he wasn’t able to connect….

He showed me the following *log/report*…

Status:    Waiting to retry...
Status:    Connecting to 37.XX.XX.XX...
Response:  fzSftp started
Command:   open "[email protected]" 22
Error:     Server unexpectedly closed network connection
Error:     Could not connect to server

and this is the auth.log on the server…

fatal: no matching mac found: client hmac-sha1,hmac-sha1-96,hmac-md5 server [email protected],hmac-sha2-256-$

Solution?
Update the SFTP client – in this case filezilla -.

Readings?
https://forum.filezilla-project.org/viewtopic.php?t=31738
https://en.wikibooks.org/wiki/OpenSSH/Logging