Forum archive
Problem with Proftpd, permissions and owner, group display
I've just upgraded my Core appliance and am in the process of reinstalling servers etc. I'm noticing some strange behaviour with Proftpd which is new (don't remember it happening with the old appliance versions).
I'm using proftpd-basic 1.3.2c-1ubuntu0.1 with the webmin module and accessing an ftp account for the web server. I've also got the SSH FTP login enabled with the ftp account rooted to its home directory.
With Filezilla 3.5.0 (latest version), I get the following behaviours ...
1. Login via Proftpd (normal ftp) as ftp user, permissions display as flcdmpe (xxxx) and owner:group as 1000:100
2. Login via SSH as ftp user, permissions display correctly (say drw-xr-xr-x) and owner:group as 1000:100
3. Login via SSH as root user, permission display correctly (say drw-xr-xr-x) and owner:group as root:root
2. Login via SSH as ftp user, permissions display correctly (say drw-xr-xr-x) and owner:group as 1000:100
3. Login via SSH as root user, permission display correctly (say drw-xr-xr-x) and owner:group as root:root
With WinSCP 4.3.4 (latest version), I get the following behaviours ...
1. Login via Proftpd (normal FTP) as ftp user, both permissions and owner:group displays correctly
2. Login via SSH as ftp user, permissions display correctly and owner:Group as 1000:100
3. Login via SSH as root user, both permissions and owner:group display correctly.
2. Login via SSH as ftp user, permissions display correctly and owner:Group as 1000:100
3. Login via SSH as root user, both permissions and owner:group display correctly.
I've found a couple of references to this behaviour (in Proftpd) on forums here and here (see third post from the bottom) implying that this is a fault with Proftpd and MLSD access not being implemented correctly.
Interestingly, if I remove the home jail for the ftp user, all the WinSCP logins work correctly as do the SSH logins via FileZilla (the normal FTP login still does not) but the FTP user gets access to the whole filesystem which I don't want to happen.
This is the way I've jailed the 'ftpusers' group to their home directory in sshd_config ...
Subsystem sftp internal-sftp Match group ftpusers ForceCommand internal-sftp ChrootDirectory %h AllowTcpForwarding no
To get this to work, I had to change the ownership of the /var/www to root:root with mode 755.
So, the questions are ...
1. Does anyone else notice the behaviour with Proftpd not showing permissions and ownership properly
2. Is there any way of forcing Proftpd to use LIST rather than MLSD in the config file (as this seems to be the main issue)
3. Is there an easily configurable alternative to Proftpd which does work correctly.
4. I could rely on SSH but have I configured jailing correctly? Why can't either FTP client get the owner:group names?
2. Is there any way of forcing Proftpd to use LIST rather than MLSD in the config file (as this seems to be the main issue)
3. Is there an easily configurable alternative to Proftpd which does work correctly.
4. I could rely on SSH but have I configured jailing correctly? Why can't either FTP client get the owner:group names?
Thanks for your time
Mark
Mark
(This shows how much of a newbie I am)
I realise that Chrooting the ftp user to his directory stops access to /etc/passwd and /etc/group. So I have copied just the ftp users credentials in passwd and group into the home directory and the client can now get the correct user credentials.
However, this seems untidy since I would have to manually update these new files each time I add a new user to the system. Since I only need FTP access for these users, I guess these are the only files I need in the chrooted directory?
M