目录的符号链接与“mount --bind”的比较和权利
我有一个网络服务器,我在其中运行两个重复的版本,就像这样
/home/domains/domainone.com/webroot
/home/domains/domaintwo.com/webroot
现在,我想共享一个目录并能够写入它们。
/home/images/
-> /home/domains/domainone.com/webroot/images/
-> /home/domains/domaintwo.com/webroot/images/
我可以设法使用“mount --bind”来做到这一点,但我总是必须确保该目录已安装。当我使用 ln -s 时,即使我将权限设置为 777,我也无法从 Apache 中的 PHP 脚本写入这些目录。正如我所说,使用 mount --bind,它可以正常工作,但我更喜欢使用符号链接。
谢谢
I have a webserver where I run two duplicite versions like this
/home/domains/domainone.com/webroot
/home/domains/domaintwo.com/webroot
Now, I want to share a directory and to be able to write to both of them.
/home/images/
-> /home/domains/domainone.com/webroot/images/
-> /home/domains/domaintwo.com/webroot/images/
I can manage to do that with "mount --bind", but I always have to make sure, that the directory is mounted. When I use ln -s, I am not able to write to those directories from my PHP script in Apache, even though I set the rights to 777. As I say, with mount --bind, it works correctly, but I would prefer to use symbolic links.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
FollowSymLinks 已经设置,问题实际上出在“open_basedir”限制中,链接目录不在列表中。
FollowSymLinks was already set, the problem was in fact in 'open_basedir' restriction, where the linked directory was not in the list.
尝试按照此处所述使用 FollowSymLinks
Try FollowSymLinks as described here