Posts Categorized: Server

Online resources for Bash commands

Posted by & filed under Linux.

Try these: And the master of all:

WordPress permissions or ownership

Posted by & filed under Linux, Wordpress.

I was recently trying to upload a plugin to WordPress and found that the plugin could not create a directory. The problem was not directory permissions – it was user/group ownership. PHP running as fastCGI is running as user nobody on my VPS. I tried changing directory perms to 777 for wp-content/uploads and wp-content/plugins but… Read more »

Linux directory size

Posted by & filed under Linux.

To display the size of directory, including sub directories, eg, for /backup: du /backup -ch | grep total See

Manually abort current bash command

Posted by & filed under Linux.

Some things won’t respond to Ctrl+C; in that case, you can also do Ctrl+Z which stops the process and then kill %1 – or even fg to go back to it. Read the section in man bash entitled “JOB CONTROL” for more information. It’s very helpful. (If you’re not familiar with man or the man… Read more »

Finding large files in linux

Posted by & filed under Linux.

Here’s a bash script to do it: #!/bin/bash # if nothing is passed to the script, show usage and exit [[ -n “$1” ]] || { echo “Usage: findlarge [PATHNAME]“; exit 0 ; } # simple using find, $1 is the first variable passed to the script find $1 -type f -size +100000k -exec ls… Read more »

PHP copy and file ownership

Posted by & filed under Linux.

Came across a taxing problem installing Joomla component on an old 1.05 installation. The error was: Warning: copy(/home/ [function.copy]: failed to open stream: Permission denied in /home/ucbmedia/public_html/home/administrator/components/com_installer/installer.class.php on line 360 Failed to copy file: /home/ to /home/ The problem was caused by ownership. PHP was running in fast-CGI mode as user ‘nobody’. But the user… Read more »

Mercury Mail

Posted by & filed under Linux.

I’m using Mercury as a local testing mail server but I need to send mail using a ‘valid’ email address because test@localhost fails validation checks. So I used Configuration -> Aliases to add and map it to test@localhost. But Mercury mail bundled with XAMPP 1.7.3 – was not working. Fix: Configuration -> Protocol modules… Read more »