-- OS X YOSEMITE 中的 FTP 服务 --
我已在 Yosemite 中使用以下命令启动了 FTP 服务:
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
然后,我需要配置它。有人知道它是由哪个文件配置的吗?另外,如何将“chroot
”设置为目录。
最佳答案
OS X
ftp 守护进程由以下文件配置:
/etc/ftpd.conf
/etc/ftpchroot
/etc/ftpusers
示例文件:cat/usr/share/ftpd/examples/ftpd.conf
/private/etc/ftpusers
The ftpusers file provides user access control for tnftpd(8) by defining which users may login.
If the ftpusers file does not exist, all users are denied access.
示例文件:cat/usr/share/ftpd/examples/ftpusers
/private/etc/ftpchroot
The file /private/etc/ftpchroot is used to determine which users will have their session's root directory changed (using chroot(2)), either to the directory specified in the ftpd.conf(5) chroot directive (if set), or to the home directory of the user. If the file does not exist, the root directory change is not performed.
The syntax is similar to ftpusers, except that the class argument is ignored. If there's a positive match, the session's root directory is changed. No further comparisons are attempted after the first successful match. This syntax is backward-compatible with the old syntax.
示例文件:cat/usr/share/ftpd/examples/ftpchroot
到chroot
目录,(例如guest
):
chroot guest /path/to/guest/accessable/ftp
更多信息:ftpd.conf , ftpusers/ftpchroot , chroot
关于macos - OS X Yosemite 中的 FTP 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31093733/