cat /etc/passwd
Tim kiem thu mua HOME cua www-data, vi du cua toi la /var/www
mkdir /var/www
mkdir /var/www/.ssh
chown -R www-data:www-data /var/www
Set a password for www-data
sudo passwd www-data
Define a shell for www-data. You can do this using chsh or by editing /etc/passwd
. Replace /usr/sbin/nologin
or similar by /usr/bin/bash
on the line of the user.
Cấp sudo
sudo usermod -aG sudo www-data