开发者

Symbolic link to directory vs. "mount --bind" and rights

开发者 https://www.devze.com 2023-04-01 13:06 出处:网络
I have a webserver where I run two duplicite versions like this /home/doma开发者_如何学Pythonins/domainone.com/webroot

I have a webserver where I run two duplicite versions like this

 /home/doma开发者_如何学Pythonins/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


Try FollowSymLinks as described here


FollowSymLinks was already set, the problem was in fact in 'open_basedir' restriction, where the linked directory was not in the list.

0

精彩评论

暂无评论...
验证码 换一张
取 消