0

I'm trying to install wordpress, and i'm following an article on the web, and one of the steps is:

Now, we need to change the permission of the ‘wordpress‘ directory. Prompt to the wordpress directory in the root directory we just copied and run the following command:

sudo chown -R username:www-data *

This command will assign the control of our wordpress directory to www-data user. This is a user web servers used to access the files. In this way the server would be able to write directly to our wordpress directory.

So I change directories, and go into the wordpress dir that's in root, run the command but get this error code:

chown: invalid user: ‘username:www-data’

I'm not sure if I'm supposed to put something other than username (the article it does specify this) or do something else.

muru
  • 207,228
LuanL
  • 3

1 Answers1

0

In the command, you are supposed to replace username with your actual username. You can find out what that is by opening a terminal and entering whoami.

You could also replace it with root if you wanted, although in this case you should add your user to the www-data group with sudo usermod -a -G www-data username.

See also:

TheSchwa
  • 3,860