Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have recently installed wordpress but I have run into the problem that when i try to install plugins and themes i lack the permissions to write files.

My OS is linux ofc, running thru ssh terminal.

I have tried the following things to give permissions to the user.

chmod -R 777 /var/www

I have also tried doing as described in this article, when i tried

sudo usermod -a -G www-data <some_user>

I got the message

could not resolve host <host-name>
share|improve this question

1 Answer 1

Whether you should be using the 'www-data' user or something else is very dependent upon your distribution. 'www-data' is very Debian-centric and also often used by their downstream derivative distributions.

Try running 'ps axufww | grep "[a]pache" '. The appropriate USER is the first column.

If you're using something derived from RedHat, it's probably 'apache' instead.

I'm not familiar with a distribution named "OFC", but I'd recommend looking at /etc/passwd to see if any listing in there have '/var/www'. If there is one, that's the user that you should be using. The appropriate group in /etc/group is frequently the same name as the user in /etc/passwd.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.