View Single Post
Old 10-01-2012, 03:26 PM   #129
Northguy began at the beginning.
Posts: 19
Karma: 10
Join Date: Oct 2011
Device: Sony PRS-T1
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.

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:

/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 "":

# mount/bind some folders

case $1 in
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
umount /volume1/video/Kinderfilms
umount /volume1/video/Series
umount /volume1/video/Speelfilms
umount /volume1/web/Calibre/Nederlands/Data
echo "Usages: $0 [start|stop]"
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