From owner-freebsd-questions Mon Jan 10 13:47:43 2000 Delivered-To: freebsd-questions@freebsd.org Received: from sasknow.com (h139-142-245-96.ss.fiberone.net [139.142.245.96]) by hub.freebsd.org (Postfix) with ESMTP id 998EB15238 for ; Mon, 10 Jan 2000 13:47:33 -0800 (PST) (envelope-from freebsd@sasknow.com) Received: from localhost (freebsd@localhost) by sasknow.com (8.9.3/8.9.3) with ESMTP id PAA04114; Mon, 10 Jan 2000 15:47:51 -0600 (CST) (envelope-from freebsd@sasknow.com) Date: Mon, 10 Jan 2000 15:47:50 -0600 (CST) From: Ryan Thompson To: jimmy martin Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Ftpd In-Reply-To: <20000110175121.68023.qmail@hotmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 10 Jan 2000, jimmy martin wrote: > How do I set anonymous acces to have acess to /usr/stuff? I read the man > page for ftpd but i can find and "flags or options" to be able to add the > dir in with. I tried to create link to there but ftp says file not found... Hi, Jimmy. There are a couple of ways. I'm going to assume for this message that your anon ftp root is in /var/ftp. As you have already discovered, soft links to paths outside of your ftp tree won't work. This is due to the fact that ftpd runs logins in a chroot environment. So, when an anonymous user logs in, he/she will have his/her root set to /var/ftp, and can not access files outside of that tree... Even with symlinks. One alternative, where possible, is to use hardlinks. Normally, you can't hard link a directory, nor can you create hard links across filesystems. Nevertheless, you have the option. Another alternative is to change your ftp root to /usr/stuff. This can be done by editing the 'ftp' user's home directory (as root) with chsh ftp, or by editing /etc/master.passwd appropriately, and executing pwd_mkdb to implement the change. You then, of course, lose the contents of /var/ftp for anonymous access :-) Create another ftp user, and add them to /etc/ftpchroot, with a home directory of /usr/stuff, and no write access to files therein. Requires a different login name, but perhaps this is what you want. If /usr/stuff is small, you could always mirror it periodically to /var/ftp/stuff. If /usr/stuff is large enough to warrant it, put it on a dedicated slice and mount it to /var/ftp/stuff Symlinks can work the other way. If you don't chroot anyone with access to /usr/stuff (not /var/ftp), move the contents of /usr/stuff to /var/ftp/stuff, and do ln -s /var/ftp/stuff /usr/stuff. Other ftpds (have a look in the ports tree or packages) allow more sophisticated functionality in terms of access control and more customizable "mount points". If you don't like any of my ideas, try some different daemons. The last symlink option usually makes the most sense... But, as I've shown, there's more than one way to skin a fs. :-) Virtually yours, - Ryan Thompson -- Ryan Thompson 50% Owner, Technical and Accounts Phone: +1 (306) 664-1161 SaskNow Technologies http://www.sasknow.com #106-380 3120 8th St E Saskatoon, SK S7H 0W2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message