Fix Wordpress Permissions on MediaTemple DV Server…

Heres a simple way to fix the permissions across all sites on a MediaTemple DV Server…

First, To stop wordpress from asking you for FTP information on plugins, add the following code at the beginning of your wp-config.php file.

 define('FTP_BASE', '/httpdocs/');
define('FTP_CONTENT_DIR', '/httpdocs/wp-content/');
define('FTP_PLUGIN_DIR ', '/httpdocs/wp-content/plugins/');
define('FTP_USER', '<FTP_Username>');
define('FTP_PASS', '<FTP_Password>');
define('FTP_HOST', 'ftp.example.com:21');

If you dont want to add this, you can install Fix Plugin Update. However, using this method will set the permissions of apache:apache on any plugin you install or upgrade, so you wont be able to edit your plugins from FTP without changing the owner/group.




Next, to solve the permissions issues on .htaccess and uploads, were going to add the ‘apache’ user to the ‘psacln’ group by editing ‘/etc/group’ with your favorite text editor. Most advanced users use vi but I used nano.

nano /etc/group

Change:

psacln:x:2524:

to:

psacln:x:2524:apache

For my server I also added psaftp,psaadm:

psacln:x:2524:apache,psaftp,psaadm

Now, for any file/folder you want writable by wordpress, just make it writable by the group.

cd httpdocs
chmod g+w .htaccess
chmod -R g+w wp-content/uploads

Thats It!

admin -

7 Comments

  1. [...] This post was Twitted by bobbykircher – Real-url.org [...]


  2. nichemedia
    May 29, 2009

    could you give a little bit more information for a new media temple DV user?? How do you edit the etc/group? Was this shell commands? Thanks !


  3. admin
    May 29, 2009

    if you ssh into your server as the administrator for your domain, you should just be able to type ‘nano /etc/group’

    then find the line that starts with psacln and add :apache to the end of it and press ctrl-o ctrl-x to save it and exit.

    If you have any other problems let me know.

Leave a Reply

You must be logged in to post a comment.