Setting FTP access for Mac OS X Leopard
The default Leopard FTP server only allows General account users to use the FTP server.
If a "Sharing only" account type user is created in the Accounts Preference Pane, then that user cannot access FTP server and will get an error message like "User username may not use FTP server".
The problem lies with the fact that a "Sharing only" user account has a login shell of "/sbin/nologin". This disables FTP access. Of course the login shell can be changed to /bin/bash etc... But this will allow the FTP user to navigate to all directories (e.g. The entire system)!!! This will certainly compromise security.
To solve this problem:
(1) Link the nologin file to ftplogin: sudo ln -s /sbin/nologin /sbin/ftplogin.
(2) We need to add the newly created shell to the system's list of available shells. Add "/sbin/ftplogin" to the end of the file /etc/shells.
(3) In the Accounts Preference Pane, create a new user with the following details:
Login shell: /sbin/ftplogin
Home directory: path to the shared folder
(4) Then create the file ftpchroot, if not exists, at /etc directory. E.g. sudo vim /etc/ftpchroot. Add the list of FTP username in that file. This shall confine the FTP users to their home directory and NOT navigate anything above it!!!