I get a permission-related error message with CustomPress & Snapshot

I have my site installed on an EC2 instance with LEMPress.
to be able to edit files directly on the server I performed:
sudo su
chwon -R ubuntu:ubuntu /home/deployer/sites/new-wordpress-site.com
find /home/deployer/sites/new-wordpress-site.com/ -d 755 {} \;
find /home/deployer/sites/new-chmod -R 775 wp-content
wordpress-site.com/ -d 644 {} \;

Now, when saving CustomPress settings I get the following messasge:
Failed to copy /home/deployer/sites/new-wordpress-site.com/wp-content/themes/twentythirteen/single.php. Please set your active theme folder permissions to 777.

In addition, I get similar error messsages when saving snapshots using the snapshot plugin.

Is there a more secure way to solve this rather than open the permissions to 777?

  • aristath

    I don't think that ubuntu:ubuntu is what you should have used there...
    You should instead use the user that is used by your webserver.
    To find out what that is, simply upload a new image to your site using the media uploader.
    Using SSH, navigate to the path where that image is uploaded and type this:
    ls -l
    If I remember correctly this will show you the user and group in the 3rd and 4th columns.
    usually it's something like www-data www-data.
    So you should do something like this:
    chown -R www-data:www-data /home/deployer/sites/new-wordpress-site.com

    Please let me know if that works for you...


  • aristath

    Hello there!
    As we haven't heard back from you we're going to assume the problem was sorted out and mark this thread as resolved.

    If it wasn't resolved, or you have any more questions related to this thread please feel free to post them below and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, thanks for using the forums, and, as always, for being a member of WPMU DEV, it's a pleasure to help you out and we look forward to being of assistance in the future.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.