I am sort of new in linux ubuntu. I tried to deploy a Django app using Nginx.
Do i need to create www-data
user in my linux? Or does it already exist?
If you installed nginx from the standard Ubuntu repos, the installation should have created both the www-data user and group. Anyway the command to check if a specific user exists is (www-data example):
grep www-data /etc/passwd
or group:
grep www-data /etc/group
If you want to be part of that group you should do this:
sudo usermod -a -G groupName userName
obviously userName is your login name. Then logout and login again, and check with:
groups
if www-data
appears, you are part of that group.
cat
into grep
, just grep www-data /etc/passwd
is enough. That said, usually you cannot become www-data
, as for security reason has /usr/sbin/nologin
as a shell.
Oct 10, 2018 at 11:29
openresty
nginx fork
it's looks didn't add www-data user group , your answer didn't show how to create this user !
www-data
user in a terminal withid www-data
.