Moderator
Yui
(@fierevere)
永子
If you cant run PHP under user’s account (php-fpm pools, mpm-itk, suphp, …)
then you have 2 choices.
1. Bad choice.
Make php exec user (www-data likely) own all WordPress files,
it will not need FTP, but can be insecure
2. A bit better choice
Make user own all files, but it will still need write access to /wp-content/uploads/
PHP user will need read access to all other files.
It will be much better if you can run PHP not as common user (www-data) but under user that owns the website, using their own account.
You can start with those manuals:
https://zoomadmin.com/HowToInstall/UbuntuPackage/apache2-mpm-itk
https://www.howtoforge.com/running-vhosts-under-separate-uids-gids-with-apache2-mpm-itk-on-ubuntu-9.04
and/or Google for “mpm-itk ubuntu howto”
Thread Starter
Bperth
(@bperth)
Thank you for your reply.
I’m using Ubuntu on Virtual Box so I have admin access to everything. It’s just a test server on a LAN.
So far I’ve just chowned the /var/www/html/wordpress to www-data to get it wordpress to work but I have no idea how secure/insecure this is. I’m guessing it’s not a very safe way to set up a production server.
I’ve installed vsftpd and configured an ftp user with home dir /var/www/html/wordpress. I can access with filezilla. If I use this user and try to use any of the wordpress admin panel commands requiring ftp access it fails with a cannot write error, presumably a permissions problem.
What is the best way to configure permissions for Apache, PHP & FTP so that the ftp features within the wordpress admin panel will work.
Thank you for the link. I’d like to see a basic explanation of best security/permissions practices for setting up a LAMP Web server.
Thank you
Moderator
Yui
(@fierevere)
永子
just chowned the /var/www/html/wordpress to www-data to get it wordpress to work but I have no idea how secure/insecure this is
If you run ONE site for ONE user – its secure enough.
If you run multiple sites for multiple users – its insecure.
This is true for production server (VPS or dedicated) too.