# su -l www-data ./http-app.py
This account is currently not available.
# su -l www-data -c ./http-app.py
This account is currently not available.
# su -c ./http-app.py www-data
This account is currently not available.
# su -lc ./http-app.py www-data
This account is currently not available.
# getent passwd www-data
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
# getent shadow www-data
www-data:*:16842:0:99999:7:::
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
What's wrong with my su
or www-data
? It used to work...
Presumably this is because of the /usr/sbin/nologin
, but how then I drop root
for this one script, without compromising other services on the system (nologin
has been chosen by Debian
team for a good reason, I want to believe)?