上传WordPress文件的权限问题

I am running a Ubuntu self-managed VPS. I've installed wordpress and have assigned a user dev to have full write and access permission through the group www-data. Now when I go to install a theme through wordpress I receive a section that ask me for FTP credentials. I assume this is because wordpress finds it is unable to write to wp-content? I went ahead and assigned a chmod 757 to the wp-content directory and it worked but gave me an error message: The uploaded file could not be moved to wp-content/uploads/2015/09.

I have checked who owns what and so far everything seems to be owned by dev user and belongs to group www-data.

Any suggestions?

Chmod 757 makes it so that the group only has read and execute permissions. It is better to have it set to 775. I suspect you also didn't chmod recursively to include all subdirectories. Try this: chmod -R 775 wp-content.

After chatting, we also had to do chown -R www-data wordpress and that fixed the problem.