我们的开发盒之一运行debian和VSFTPD,我想允许一些select用户写入/var/www/testsite及其子目录。
他们可以通过其主目录中的符号链接浏览到/var/www ,但是他们无法写入。 使用FTP或SFTP无关紧要。
有任何想法吗? 我发现这个问题很难谷歌。
你在/ var / www /和/ var / www / testsite /上有什么权限?
我的build议是给/ var / www / testsite /一个如testsiteGroup这样的组,确保/ var / www / testsite对组具有rw权限,然后将用户添加到组testsiteGroup。
chgrp -R testsiteGroup /var/www/testsite/ chmod g+w /var/www/testsite/ usermod -a -G testsiteGroup # this wil be done for each user, and the -a is critical # the -a appends group to users groups, without -a you will # be replacing the users groups with the one listed
如果您通过SFTP使用完全身份validation(您应该为了记帐),那么vsftpd将使用用户的权限来修改文件。
正因为如此,有两个解决scheme:
www-data或www ) /var/www目录中,这会更加细化,但是需要使用acl标志来挂载分区 如果您使用匿名访问或FTP(本质上是不安全的),我强烈build议去第二条路线。