I've created a new user for FTP.
useradd -g www-data -d /srv/www/vhosts/project/ black
I made a mistake, I actually need the user to be in the group www
.
How can I change the group?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityYou can use:
sudo groupadd www # Add a new group, if not exists
usermod -a -G www black # Add the existing user black to www
usermod -g www black # Change the primary group of black to www
To confirm that it has been added:
groups black
From removing user from secondary group, in this case www-data
group:
gpasswd -d black www-data