chown: invalid user: ‘www-data:www-data
9,053
The www-data is for ubuntu, try with apache for username and group
sudo chown -R apache:apache /var/www/laravel/
Make sure that the package is install.
Author by
Cebrayil
Updated on September 18, 2022Comments
-
Cebrayil over 1 year
I am trying to install laravel , now I need to Set the required permissions for the project . when I wrote
sudo chown -R www-data:www-data /var/www/laravel/
I am getting errorchown: invalid user: ‘www-data:www-data’
.What is the problem?-
Seth almost 5 yearsIt clearly states what the problem is so what are you confused about?
-
Cebrayil almost 5 yearsI am using nginx not apache .can I write sudo chown -R nginx:nginx /var/www/laravel is the same thing?
-
Seth almost 5 yearsYou will have to check how your system is setup and what users actually exist. For example do a
ls -la /var
and look what user and group is set for the www directory, check your service configuration,htop
or your passwd file. -
Cebrayil almost 5 yearsI checked etc/passwd nginx:x:998:996:nginx user:/var/cache/nginx: this line exist .
-
Seth almost 5 yearsIn that case you could try our suggestion. The target of the
chown
command is to make the file owned by the user and group the webserver uses.
-
-
Cebrayil almost 5 yearssudo chown -R nginx:nginx /var/www/laravel/ is that okey?
-
pioupiou almost 5 yearsYes run with that, i don't know you have nginx