symbolic causes zm to fail

Forum for questions and support relating to the 1.24.x releases only.
Locked
j1mw3b
Posts: 26
Joined: Sat Feb 28, 2009 1:28 pm

symbolic causes zm to fail

Post by j1mw3b »

I created a symbolic link for apache2 like
srv ->/m/srv
where /m/srv is a separate filesystem.
Also changed apache /etc/default-server.conf to allow symlinks; e.g.
Options FollowSymLinks SymLinksifOwnerMatch

Apache seems to work, at least in it's simplest form - I get "It Works" when I go to the website.
But Zoneminder is failing with a "Access forbidden", Error 403 when I try to go to the ZM console.

Looked in the ZM Options but didn't see anything to do with symlinks.
I see this in my /var/log/error_log:
[Wed Apr 08 20:36:09 2009] [error] [client 192.168.6.2] Symbolic link not allowed or link target not accessible: /srv, referer: http://myth/zm/

Seems there must be something else to set - either in Apache or ZM.

Any ideas?

Thanks

Jim
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

If you cant figure it out, instead of using a symlink you can do this:

mount --bind /some/source/dir /some/destination/dir

It will give you the same effect as a hard link, except it works across filesystems unlike the ln command. This uses a new feature in 2.6 kernel that lets you mount any part of a filesystem onto any part of any other filesystem. It will not appear as a symlink and the only way you will see it is if you type "mount"

If you want this to be permanent (survive a reboot) you can put it in your fstab like so:

/dir1 /dir2 none bind
j1mw3b
Posts: 26
Joined: Sat Feb 28, 2009 1:28 pm

symlink

Post by j1mw3b »

Wow, very nice. Will give it a try.
Have kernel 2.6.25.18

Thanks much
j1mw3b
Posts: 26
Joined: Sat Feb 28, 2009 1:28 pm

symlink

Post by j1mw3b »

OK, tried it. Works good!

Thanks again

Jim
Locked