jpvalery
By:
jpvalery

Authorization/Permissions issues on a LEMP stack

April 26, 2015 924 views
LEMP Getting Started Configuration Management Miscellaneous Nginx Ubuntu

Hey everyone,

I’ve finally taken the big leap yesterday :) Thanks to the awesome tutorials of the community I managed to set up my LEMP stack and get everything rolling and transfer my wordpress install from my lame shared hosting to DO :)

Everything is running smoothly except that I've now a permissions issue.

So I’ve my droplet with a LEMP stack.

I have one non-root sudo user that I used to install everything and configure everything. This is the user I’m using to connect with Transmit (my SFTP client).

Then following this tutorial https://www.digitalocean.com/community/tutorials/how-to-configure-secure-updates-and-installations-in-wordpress-on-ubuntu I created another user to be able to do the updates in WP.

Both these users are member of the www-data group - which is the group returned by

echo exec( 'groups');

But now when I try to upload a file through Transmit, I’m prompted with an error message saying something like « make sure you have the necessary authorizations".

I guess I must have f***ed up somewhere with the users and groups and authorizations, but in the current situation I don’t know where this might be originating from. Thus, I’m clueless about where to start looking and what looking for.

If you have any idea, or direction to point me to, it’d be a huge help. Or if you have a fix, it’s great too haha :D

Thanks in advance for your help,

1 comment
  • Ok so I tried with a fresh mind this morning and since I was able to upload manually to wp-content/uploads I checked the permission of the folder /var/www/html/.
    html was with a 755 chmod - changed to 775 and now it's working perfectly.
    I'm just curious now : is it safe to let /var/www/html with a 775 chmod or should I reverse it to 755 and change it back when necessary ?
    Thanks :)

1 Answer

This question was answered by @jpvalery:

Ok so I tried with a fresh mind this morning and since I was able to upload manually to wp-content/uploads I checked the permission of the folder /var/www/html/.
html was with a 755 chmod - changed to 775 and now it's working perfectly.
I'm just curious now : is it safe to let /var/www/html with a 775 chmod or should I reverse it to 755 and change it back when necessary ?
Thanks :)

View the original comment

Have another answer? Share your knowledge.