Ubuntu – Adding existing user to existing group and providing permissions

ftpUbuntuuser-managementuser-permissionsusermod

can someone shed some light on this issue

I've set up and installed vsftpd. Created a user ftp-user and created a home directory, so they can log in, and just have access to drop their files here.

>> sudo useradd -d /home/ftp/ftp-user -m ftp-user

This works fine, user successfully logs in over ftp, uploads a file.

I now need to be able to access this ftp-user directory as another user say for example ubuntu. There is a script that runs as ubuntu, and I need to be able to access the directory to be able to grab the files and copy them across to other locations.

I tried to add ubuntu to the ftp-user group:

sudo usermod -a -G ftp-user ubuntu

Although, when trying:

>> whoami
ubuntu
>> cd ftp-user/
>> -bash: cd ftp-user/: Permission denied

Hope someone has an idea – Cheers in advance!

Best Answer

New groups are only picked up when the user logs in. Log the ubuntu user out then in again.

Related Topic