Troubleshooting WordPress Attachments

Went to make a post this morning and found that I was getting a nice little error from WordPress, posted below:WPError

Sounds like a permissions issue I think. /me makes some coffee and proceeds to troubleshoot the root cause. Let us see what is in the wordpress directory and take a look at wp-content’s permission settings.

drwxr-xr-x   4 wordpress  wordpress      5 Feb  2 12:11 wp-content/

Okay so wordpress is the owner and group, the owner has full permissions and the group has read and execute permissions.

Let’s try this, root@Wordpress:/usr/local/www/apache24/data/wordpress # chmod 775 wp-content/, same error.

Let’s try root@Wordpress:/usr/local/www/apache24/data/wordpress # chmod 777 wp-content/, voila. Hrmm, I’d be shot if I left 777 and called it a day. Let me check to see what permissions were set when the file was successfully uploaded with 777 in-place.

-rw-rw-rw-  1 www  wheel  16896 Apr  8 08:45 AbarthSuspensionForm.xls, ah ha!

Reset the permissions to 755 and change ownership via: chown www: wp-content

Check our work:

drwxr-xr-x   4 www        wordpress      5 Apr  8 08:47 wp-content/



Leave a comment

Your email address will not be published. Required fields are marked *