Error: Failed to create temporary file

Issue ====== The apache error log shows [Wed Oct 28 23:49:30 2015] [error] [client xx.xx.xxx.xxx] ModSecurity: Input filter: Failed to create temporary file: /root/tmp/20151028-234930-VjGXSkAWQiQAA@W7VAsAAAAD-request_body-nKiZdT [hostname “www.xxxx.com”] [uri “/wp-admin/admin.php”] [unique_id “VjGXSkAWQiQAA@W7VAsAAAAD”] The issue is because the modsecurity has no access on /root/tmp directory. So while accessing /root/tmp it will show the error “Failed to create temporary … Read more

Different Ways of File transfer to a remote server using ssh protocol

Different Ways of File transfer to a remote server using ssh protocol.

Scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.

Using scp from destination server

scp root@source_server:/path/to/file /path/here/
scp -P 2222 root@source_server:/path/to/file /path/here/ #with ssh port 2222
scp -r root@source_server:/path/to/directory/ /path/here/ #copy entire directory

Using scp from source server

Read more

Output alignment problem for ‘df’ command

Sometimes we need to get the output of df command in an arranged manner to use the output in some scripting or not. You can use the following command to view the output in properly formatted form.

df -Ph

   -P, --portability use the POSIX output format
   -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)

You can check the following screenshots for more details.

Read more