Rights/Permissions/Owners of a wordpress installation

Which rights, permissions and properties must be set in a wordpress installation on Manjaro?

my DOCRoot = /srv/http
Group of this directory and subdirs: root
Owner of this directory: http ?

I experience the error that permissions are not set for downloads and installation of themes and plugins.

Can anybody help?


Something like this will probably do the trick (from my toolbox) - but I use grav cms

sudo chgrp -R http .
find . -type f | sudo xargs -d'\n' chmod 664
find . -type d | sudo xargs -d'\n' chmod 775
find . -type d | sudo xargs -d'\n' chmod +s
umask 0002

Then add your self to http group

$ sudo groupadd -a $USER http

Thankyou that might have solvd my problem and the following shellscript (which I found somewhere):

# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
WP_OWNER=http # <-- wordpress owner
WP_GROUP=root # <-- wordpress group
WP_ROOT=/srv/http # <-- wordpress root directory
WS_GROUP=root # <-- webserver group

# reset to safe defaults
find ${WP_ROOT} -exec chown ${WP_OWNER}:${WP_GROUP} {} \;
find ${WP_ROOT} -type d -exec chmod 755 {} \;
find ${WP_ROOT} -type f -exec chmod 644 {} \;

# allow wordpress to manage wp-config.php (but prevent world access)
chgrp ${WS_GROUP} ${WP_ROOT}/wp-config.php
chmod 660 ${WP_ROOT}/wp-config.php

# allow wordpress to manage wp-content
find ${WP_ROOT}/wp-content -exec chgrp ${WS_GROUP} {} \;
find ${WP_ROOT}/wp-content -type d -exec chmod 775 {} \;
find ${WP_ROOT}/wp-content -type f -exec chmod 664 {} \;