I'm using ProFTPd 1.3.5a (btw I get the same behavior on an older 1.3.4d) with a pretty common virtual users setup for a web server.
In plain words, ProFTPd is running with apache's UID/GID and has its local files for authentication. All users have the same real UID/GID (again, apache's one) and are chrooted in their directories, with DirFake* entries.
This is an excerpt from configuration:
AuthPAM off
AuthOrder mod_auth_file.c
AuthUserFile /etc/proftpd/ftpd.passwd
AuthGroupFile /etc/proftpd/ftpd.group
UseFtpUsers off
DefaultRoot ~
DefaultChdir /
DirFakeUser on ~
DirFakeGroup on ~
DirFakeMode 0644
ShowSymLinks off
Umask 026 027
<Directory ~/>
UserOwner www-data
GroupOwner www-data
</Directory>
But with every ftp client I try, when listing files I only get numeric UID/GID and not the virtual user name. This is also annoying because clients such as CyberDuck will assume that numeric ID is not the same as the user they are connected with, and will show all files/directories as inaccessible (even if then trying to access them actually works).
edit: on the server there is a "real" user www-data
with UID 33 and group www-data with GID 33, ProFTPd runs with that UID/GID, the virtual users in /etc/proftpd/ftpd.[passwd|group]
all have uid=gid=33, all the files in the users directories have uid=gid=33. Right now ftp clients list all files as uid 33 and gid 33 and fail to convert numeric IDs to user / group names. I don't want to show files as belonging to www-data
in ftp clients, but belonging to the user name they used to authenticate.
This is also what the mod_ls
would do with DirFake*
options, as I understood it: throwing fake user/group to the connected clients. It isn't doing that or at least it is doing that just for the numeric IDs.
How can I let ProFTPd show the virtual user name in listings to clients?