【发布时间】:2011-07-17 20:23:00
【问题描述】:
所以我搜索了一下,找到了有关如何创建 FTP 用户并授予他对目录的访问权限的说明
To create FTP user through SSH you would need to follow below mentioned steps:
1. Login as root through SSH.
2. Next add the user account you want using the 'useradd' command
useradd <username>
3. Now create a special group for that user.
groupadd <groupname>
4. Now to add the user to the group
gpasswd -a <username> <groupname>
These commands are non-standard but
available on most popular
distributions. If not, then you can
try editing /etc/group using your
favorite text editor.
5. Change the group ownership of the special directory to that group.
chgrp -Ra groupname
/path/to/your/web/directory
6. Enable write permissions
chmod -R g+rw
/path/to/your/web/directory
现在一切都很好,但问题是在 ftp 上,我的用户(名为 jon)按照说明登录到目录 /home/jon 而不是我为他的组设置的 Oxford 目录:`/home/域名/public_html/壁纸
如果您想更改权限,您应该使用二进制选项而不是字母顺序。例如:
chmod 777 - 为所有用户做所有事情。使用 755 可能会更好。
【问题讨论】:
-
您需要更具体。这是什么操作系统?你在运行什么 FTPd?这完全取决于操作系统和 FTP 服务器。例如,在 ProFTPd 上,您可以为每个用户设置不同的用户目录。
-
apache,centos,我相信我有proftpd