最终目标是拥有一个网页,几个人可以在业余时间工作。我创建了一个目录 /WEBSITE/public_html,并希望主页在这里,以便几个贡献者能够访问。创建了一个名为 webadmin 的用户组,并将用户添加到该组中。然后执行 chown -R mainuser:webadmin /WEBSITE 然后我执行 chown -R mainuser:webadmin /WEBSITE/public_html。我希望能够通过 SFTP 进入服务器并将我的网站发送到它。我可以通过 sftp 进入,但它不允许我将文件发送到那里。我遗漏了什么?我知道这是一个超级新手问题,所以感谢您的时间和耐心。
克劳博士
答案1
确保目录权限正确: http://www.techrepublic.com/article/linux-file-and-directory-permissions/
目录权限
目录的权限与文件的权限并不完全相同。以下是目录所需的一些典型权限:
Execute permission is required for a user to cd into a directory. Read permission is required for a user to use a command such as ls to view the files contained in a directory. Execute-only permission allows a user to access the files in a directory as long as the user knows the names of the files in the directory, and the user is allowed to read the files. Write permission allows the user to create, delete, or modify any files or subdirectories, even if the file or subdirectory is owned by another user