Default wordpress folder permissions

It is important to keep your WordPress installation as secure as possible. One of the most common mistakes is setting the folder permission to world or group writable. There is no need for this, and if a plug-in requires this setting, I would definitely think twice about installing it.

I wrote a quick script that would reset all my folder and file permissions.

#!/bin/sh
find ./html -type d -exec chmod 755 {} \;
find ./html -type f -exec chmod 644 {} \;

An excellent site to learn more about Unix permissions can be found here.

Troubleshooting Section.

  • Unable to locate WordPress Plugin directory

Recently when trying to upgrade a plug-in I received the infamous (Unable to locate WordPress Plugin directory.) This was actually due to a setting on the ftp server that I was using. It was setup to jail ftp users to their home directories. This works great if you only manage one site, under one account. In my case, I was able to remedy this by changing the ftp config file to the following

# Use this to jail all users in their homes
DefaultRoot                     ~ !MrOdysseus

If you are running your own server, checking the log files are a tremendous help.

  • Apache Server-Status not found

Cacti was polling and logging apache statistics for some time without any problems. I recently discovered that you can’t have wordpress Permalink/mod-rewrite enabled without running into some problems when cacti tries to poll for data. Since anything hitting the main site at /server-status, is automatically trying to be rerouted by wordpress.

A quick fix was to add a new virtual host entry that would disable all overrides for traffic hitting localhost, which is exactly what was needed to get cacti to work. Apache documentation can be found here.



ServerAdmin root@silly-url.com
ServerSignature Off

Options -Indexes
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0

This entry was posted in Tips & Tricks and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>