OK I managed to get this working.
I figured that connecting via CIFS wasn't the solution and was better using NFS since its more native to Linux. So I connected to my NAS and enabled NFS.
I next had to install NFS support on my Ubuntu 14.04 install.
Next I had to create a directory on the file system to mount my NAS too.
Great! I now need to set my Ubuntu install to map the NAS to the directory every time it boots up, to do this I needed to edit the FSTAB file.
Add the command in to map my NAS to the directory.
Code: Select all
192.168.0.2:/Network /mnt/blackbox nfs _netdev,auto 0 0
Now we have to redirect the ZM events and images folder, so still in the fstab file I added the following.
Code: Select all
/mnt/blackbox/CCTV/Images /usr/share/zoneminder/images none defaults,bind 0 2
/mnt/blackbox/CCTV/Events /usr/share/zoneminder/events none defaults,bind 0 2
/mnt/blackbox/CCTV/Images /var/cache/zoneminder/images none defaults,bind 0 2
/mnt/blackbox/CCTV/Events /usr/cache/zoneminder/events none defaults,bind 0 2
Saved everything and rebooted. It still didn't work, however this was down to permissions. I had to do the following, this will allow ZM to write to the directorys on my NAS.
Please note: I had to enable root access on my NAS to enable the following commands to work.
Code: Select all
sudo chown www-data:www-data /mnt/blackbox/CCTV/Events
sudo chown www-data:www-data /mnt/blackbox/CCTV/Images
Rebooted everything and it all worked spot on.