FTP server with vsftpd
I read the manual of vsftpd.conf, and it says "If chroot_local_user set to YES, local users will be (by default) placed in a chroot() jail in their home directory after login". I think this means if I enable this directive to Yes, when users connect to my FTP server, they only can access to their home folder.
But the manual warns me "Warning: This option has security implications, especially if the users have upload permission, or shell access. Only enable if you know what you are doing". Why it says so? I permit my users to upload files, but when they are restricted in their home directory, where is the problem?
Usually you should not trust any uploaded files. Ideally they are chowned to an unpriviledged user account and the uploader should not have any rights to the file once the upload was complete. Only after an administrator evaluated the files, they should be accessible again.
In a home directory the user usually has the right to change the files and to set permissions. For example a user may upload a file and choose to execute the file in his userspace.
If the file is an exploit there is the possibility that the user may escalate their userrights.
For security reasons the upload area of a ftp server should be on a seperate partition. The chrooted users should get access to these areas via bind-mount.
|All times are GMT -5. The time now is 05:34 PM.|