After building a LAMP stack, it's my understanding that Apache
creates a www-data
user. But you can't directly log in as www-data
(security reasons). Instead, if you want to do something as www-data
then you have to run this:
su -s /bin/bash www-data
I can live with that. But I have 2 questions:
- What do you do, when you want to upload files via FTP? Currently, I have to FTP as a root user and then
chown
the files back towww-data
after the upload. I run Magento, and that setup insists that I only give theowner
permissions towrite
. Otherwise, I'd just givewrite
access togroup
. - What do you do, when you want to allow a non-root user to
su
aswww-data
? Because if you runsu -s /bin/bash www-data
as a normal user, then they seeThis account is currently not available
.
www-data
is the default user for the Debian/Ubuntu packages. RHEL/CentOS uses a user calledapache
. Apache httpd lets you configure this how you want, and the distros have significantly different default configs.