A simple way to create basic FTP shares and users
Jun 22, '04 09:29:00AM
Contributed by: Anonymous
If you're trying to share a bunch of large files, it should be super easy, but it's not. I tried several approaches, but the following seemed to be the best. It's not unique, but it took me a while to figure out that it was the best no-software approach, so I thought it would be nice to have a primer for the semi-power user. Follow these directions to set up an FTP server with a single user, who has read-only access to one folder of your choice.
- Go to System Preferences -> Accounts.
- Create a new user (+ button).
- Give them a name and password, then click on the Limitations tab and select Some Limits, then uncheck everything. Just in case.
- Use NetInfo Manager to change the user's home directory to the folder that you want to share (I wanted to share the same folder I share when file sharing). Look under Users -> Username -> Home.
- Delete the original home directory.
- Go to System Preferences -> Sharing.
- Turn on FTP access. Be sure to forward ports 20-21 if you have an external firewall.
- To link to your FTP server: ftp://username:password@1.1.1.1 . If your IP is dynamic, it will eventually change. If you are going through a router, then use your router's WAN IP, port-forwarded to your computer's LAN IP. Leave out the password (and the :colon) to marginally increase security (make them type the password).
To automate, check out this hint: A shell script to add FTP users in 10.3
Why do it this way? It's simple and requires no additional software. If you want to do more (lots of users, advanced GUI control over your FTP server), then this is not the best solution.
[robg adds: When I needed to send many hundreds of megabytes of book image files to my editors, I used CrushFTP, a Java-based FTP server. It's a bit tricky to set up, but has tons of control over users and privileges -- users don't need to exist outside the CrushFTP space, which is a nice feature when you need to allow multiple users access.]
Comments (11)
Mac OS X Hints
http://hints.macworld.com/article.php?story=2004040118235254