Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
Can you post the output of ls -l /home/ftp/? –  Khaled Feb 16 '12 at 12:09
    
Ah - my permissions weren't allowing me in to the directory, I've updated this. Will try logging in and out. - Thanks! –  williamsowen Feb 16 '12 at 12:24
    
note that adduser ubuntu ftp-user is an easier to remember way to add the user ubuntu to the ftp-user group –  stew Feb 16 '12 at 12:48
add comment

1 Answer

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

share|improve this answer
    
running groups in a shell will list the current groups for that shell. –  stew Feb 16 '12 at 12:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.