I've installed WordPress but am struggling to correctly configure permission to the WordPress directory. When attempting to install plugins or update WordPress, I'm getting this message:
To perform the requested action, WordPress needs to access your web server.
This is the permission set (recursively) on the WordPress directory:
steve@binky:~ $ ls -al /var/www/html/
total 20
drwxrws--- 3 steve www-data 4096 Oct 30 12:13 .
drwxr-s--- 3 steve www-data 4096 Oct 26 23:55 ..
-rwxr-x--- 1 steve www-data 766 Oct 27 00:07 index.php
-rw-r--r-- 1 steve www-data 19 Oct 30 12:13 test.php
drwxr-s--- 5 steve www-data 4096 Oct 27 19:14 wordpress
This is the output from ps aux | grep www-data
steve@binky:~ $ ps aux | grep www-data
www-data 842 0.0 3.8 195832 36424 ? S 11:59 0:03 /usr/sbin/apache2 -k start
www-data 843 0.0 3.7 195944 35508 ? S 11:59 0:01 /usr/sbin/apache2 -k start
www-data 844 0.0 3.7 195956 35344 ? S 11:59 0:02 /usr/sbin/apache2 -k start
www-data 845 0.0 3.9 195964 37556 ? S 11:59 0:02 /usr/sbin/apache2 -k start
www-data 846 0.0 3.9 195948 37096 ? S 11:59 0:02 /usr/sbin/apache2 -k start
www-data 1023 0.0 3.9 195844 37440 ? S 12:03 0:04 /usr/sbin/apache2 -k start
www-data 1078 0.0 3.7 195944 35548 ? S 12:07 0:02 /usr/sbin/apache2 -k start
steve 3329 0.0 0.0 7480 540 pts/0 S+ 14:53 0:00 grep --color=auto www-data
If I make www-data the owner of /wordpress I can install updates, but then I lose the ability to access the WordPress directory with my FTP application. This prompted me to add my account to the www-data group:
steve@binky:~ $ grep 'www-data' /etc/group
www-data:x:33:steve
I assume I've missed some crucial step but can't figure it out for myself. Is anyone able to help please?