Misc: Error 500 – Internal server error while editing posts – unable to view wordpress dashboard items

If it’s only happening to a few posts or you can’t see all items/boxes in your dashboard then it’s your php module starving for more memory.

If you’re hosting the site, edit php.ini and add give it more memory. If you don’t know where php.ini is use the following command:
find / -name "php.ini"
Find memory section and dedicate what you want.

If your site is hosted, then create a php.ini file in wp-admin directory, and add the following line:
If 15 is not good enough try 20 or 30.

Riverbed Steelhead: Purdy kernel panic message :)

So I was playing around with a brand new Steelhead web accelerator appliance. Curiosity made me try to virtualize the darn thing and see if I can get it to work with multiple NICS and without the fancy box. Since nothing is impossible and no one was around to stop me, I created an image of the drive and converted it to a VMware Server virtual appliance… it MUST be a *nix flavor, right? No doubt! Who the heck would ever think of Redmond when it comes to creativity?

I was right because the first thing I ran into was a kernel panic. I decided to screenshot and post it for everyone to see… it’s “slightly” different than a normal kernel panic:

There it is. I leave it to you to figure out why I liked it. To the Riverbed guys: nice touch 🙂

P.S. Don’t ask about what happened after I took care of the panicing kernel… hush!

Linux: vsftpd and symbolic links

vsftpd is all about security, and that’s why you cannot access linked directories through vsftpd with any ftp client. My arguement is that if you know how to use symlinks, or are careful enough not to link directories you don’t want to share then who’s vsftpd to butt in and completely disallow you to use such convenient feature of an OS? Reminds me of Windows Server type security… they block IE by default so that you have to either allow every single site, or disable IE ESC altogether.

Here is my convenient workaround: use mount bind!
mount --bind /sourcedirectory /destinationdirectory
You can either use @reboot cron job to have the directories mounted, or mount though fstab by adding the following line:
/directory-you-want-to-mount /destination-directory none bind
Haa… gotcha, but don’t go too fast! This is mount, not ln and will NOT create a mount point in your destination directory. For instance, if you want to mount /home/share to /home/user/share you will need to create /home/user/share first, then mount. Also keep in mind that if you have a copy or rsync job to copy contents of /home/share AND /home/user recursively, you will create two full copies of /home/share directory. One in /home/share and one in /home/user/share. Exclude one of the directories from your cp or rsync job.

Linux: Share a directory between local users

I spent a few hours yesterday trying to get this done but ran into several problems, and worst of all, I couldn’t find one single post addressing all permission problems associated with allowing several users access to the same directory for read/write operations.

The best way of creating a shared directory is to create a user and group, and then a home directory. Make other users members of the new group and set permission inheritence to propagate to child objects regardless of the user who is creating or uploading the file.

User name is shareowner and group, sharedhome.

Create a user, group and home directory for the new user:
useradd -d /home/shareowner -g sharedhome -m shareowner

The above command creates a user and group as user’s primary group. I wouldn’t create a password for the user if I don’t want the user to actually be able to logon to the server. Once the home directory is created I will add the existing users to the new group:
usermod -G sharedhome existinguser1
usermod -G sharedhome existinguser2

and so on. Note that I use -G and not -g, as I want users to become additional users of the new group. Now we set permissions for the new directory… I make shareowner the owner, and sharedhome the group that owns the directory:
chown -R shareowner:sharedhome /home/sharedhome

Then I use umask and chmod to force all files in /home/sharedhome to inherit permissions from the top directory:
umask 002
chmod -R g+s /home/sharedhome

That’s it. Now existinguser1 and existinguser2 should have read/write permission to /home/sharedhome directory.