Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    FTP (vsftpd) users config question

    I believe I'm close to my goal. But I'm missing something.

    I know how to create users, to access their apache directories. My problem is creating 2 or more users to access the same directory - and have permissions to modify files with their ftp clients.

    So far, multi-user accounts can view the same directory, but they cannot upload anything.

    Here's the breakdown of what I've done.

    1. I've chown'd apache.apache to the directory I am using: /var/www/html/
    #chown -R apache.apache /var/www/html/

    2. I created 2 new ftp users, and :
    #useradd george -d /var/www/html/
    #useradd johnny -d /var/www/html/

    3. Added the new users in the chroot_list
    #vi /etc/vsftpd.chroot_list

    4. Ensured the new users only have specific access to /var/www/html/
    #vi /etc/passwd

    george: x :558:559::/var/www/html/
    johnny: x :559:560::/var/www/html/

    (as I understand "sbin/nologin" ensures this)

    5. I assigned the new users to the apache group
    #vi /etc/group

    apache: x :48:root,george,johnny

    6. restarted the service
    #service vsftpd restart

    So far, everythings good to go, except I cannot modify files with these new users. But, I can see all the files just fine.

    Do I have a missing step somewhere? Does something need to be changed in the vsftpd.conf file?

    Any help would be awesome!
    Last edited by msteele; 07-13-2009 at 08:18 PM. Reason: had to change :x to non-emoticon format

  2. #2
    Just Joined! jaysunn's Avatar
    Join Date
    Apr 2009
    New York City - USA
    Please run this and post the output:

    ls -al /var/www/html/


  3. #3
    1. sbin/nologin is not a valid shell -- check /etc/shells to make sure it is listed and it actually exists. /sbin/nologin is probably what you want.

    [[ The following is a bit advanced, so don't try it unless you know what each command does ]]

    2. if there is nobody else accessing that directory you need to add the group permission to that directory:

    # find /var/www/html/ -type d chmod -R g+rwx {} \;
    # find /var/www/html/ -type f chmod -R g+rw {} \;

    That will give the group permissions over the directory and group. To make sure all of the new files have group permissions you should set a sticky bit:

    # chmod g+s /var/www/html/

    I hope that helps.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts