View Single Post
Old 10-01-2012, 02:26 PM   #129
Northguy
Member
Northguy began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Oct 2011
Device: Kobo Glo HD
Quote:
Originally Posted by CBebop View Post
Give this a try, it will "Mount" the directory you want inside your webroot and it works for things like vsftpd which also doesn't follow symlinks.

Code:
mount --bind /dir/where/files/are /webroot/directory
And to make it persist on reboots if it works for you, you can add something like this to your FSTAB:

Code:
/dir/where/files/are /webroot/directory none rw,bind 0 0
Damn.... so simple.... Why didn't I think of this. I tried symlinking and all sorts of other tricks that didn't work out..... Now I got my Calibredatabase working from a folder that resides outside my webroot!

I did not add the line to my FSTAB though. I made the following startup script "S99mount.sh":

Quote:
!/bin/sh
# mount/bind some folders

case $1 in
start)
mount -o bind /volumeUSB1/usbshare/video/Kinderfilms /volume1/video/Kinderfilms
mount -o bind /volumeUSB1/usbshare/video/Series /volume1/video/Series
mount -o bind /volumeUSB1/usbshare/video/Speelfilms /volume1/video/Speelfilms
mount -o bind /volume1/Documents/Calibrebibliotheek/Nederlands /volume1/web/Calibre/Nederlands/Data
;;
stop)
umount /volume1/video/Kinderfilms
umount /volume1/video/Series
umount /volume1/video/Speelfilms
umount /volume1/web/Calibre/Nederlands/Data
;;
*)
echo "Usages: $0 [start|stop]"
;;
esac
and this startup script resides in my /usr/syno/etc.defaults/rc.d directory. Probably not the way it should be, but it works
Northguy is offline   Reply With Quote