需要有关 Ubuntu 18.04 上的 bindfs 的帮助

需要有关 Ubuntu 18.04 上的 bindfs 的帮助

我绞尽脑汁想让 bindfs 工作。我想使用 /var/www/html 作为我的网站,但由于权限问题,我决定使用 bindfs。所以我输入了。

ls -l /var/www
drwxr-xr-x 3 root root 4096 May 26 09:20 html

我和所有者 joe 创建了如下目录。

/home/joe/websites/thermos

然后我尝试了这个:

sudo bindfs -o create-with-perms=0770, force-group=joe, force-user=joe, create-for-user=www-data,create-for-group=www-data /var/www/html/thermos /home/joe/websites/thermos

我得到的错误是:

Failed to resolve source directory `force-group=joe,': No such file or directory

我在 Google 上搜索过类似的错误,但没找到。我真的很困惑我做错了什么。试过了绑定文件系统使用和不使用 sudo 都得到了同样的错误。我没有尝试文件系统方法,只是想让事情变得简单。提前感谢任何帮助。

答案1

您是否尝试过以其他方式应用参数?

sudo bindfs --create-with-perms=0770 --force-group=joe --force-user=joe --create-for-user=www-data --create-for-group=www-data /var/www/html/thermos /home/joe/websites/thermos

答案2

输入bindfs命令时,请避免在参数之间使用空格,如下所示:

sudo bindfs -o create-with-perms=0770,force-group=joe,force-user=joe,create-for-user=www-data,create-for-group=www-data /var/www/html/thermos /home/joe/websites/thermos

相关内容