VSFTPD system users and the need for a public folder


(Jeroen Visser) #1

NethServer Version: 7.4
Module: vsftpd

Hey all. Question regarding the use of systemusers with vsftpd, and the need for a shared FTP (public if you like) section.

In my previous implementation, I started with virtual users, created a single user, then switched to system users, and bind mounted the virtual users ftp folder in each and every homefolder. Tho this works, it is a bit of a workaround.

Is there a proper way to accomplish this without bind-mounting a folder a gazillion times ?

Is there a HOWTO to set up FTP to use a shared folder on an AD system?
(Markus Neuberger) #2

I think it would be nice to combine your users with the ftp users, this should be possible:

Maybe we can make a custom template.

(Jeroen Visser) #3

This is doing the same thing in a more complicated way it seems.

By default, Samba will create homedirs. This will be /var/lib/nethserver/home/user1 and accessible as \server1\user1\ to only user1.
By default, after switching VSFTPD to system-users, it uses the user-home-dir.

So I already have the situation where user1 has access to his homedir through both windows share and secureftp.

What I am trying to do (and it works) is giving a subset of users, a shared folder for an FTP which is shared, but where I do want to know who accessed it and edited what and when, so a single account doesnt work.

My solution was to create a folder /var/lib/nethserver/ftp/public
chgrp “Domain Users” or whatever your filter will be for users that should have access.
chown ftp
chmod 770

then I bind mount this public folder to each users home-dir by editing fstab.

(For customers, the setup is worse … they get chrooted to a subfolder of this public ftp folder. Nice spaghetti, but works like a charm.)