User Tools

Site Tools


Technical Projects and Notes


bind mount to get web server link to files outside Documentroot device

Wanting to give access at home to some files of use for home activities, I set up a web server (I tried both nginx and apache2). However, a symlink to the files of interest pointed outside the current device. I was able to point to files in my home directory from a symlink in /var/www/html without difficulty. (/home is on same device as /var/www)

I tried a number of configuration settings in the .conf files, including “alias” and various FollowSymLinks tries, without success.

At the April 4 linux-ottawa meeting, Alex Pilon suggested a bind mount, and this works.

My example:

Directory /var/www/html/ contains files and symlinks There is a directory tto18 with 755 permissions and root ownership.

The command

sudo mount -o bind /media/john/Rebecca /var/www/html/tto18

allows local users (on local router, and therefore hopefully inside the firewall) to access my machine as “john-j6-18.local” and see this directory, which points to a disk that is attached.

To get this set up when my machine boots, I tried adding the command “/home/john/bin/bmreb” to the Startup Items in the Linux Mint Control Centre. “bmreb” is a file with contents

# bmreb -- bind mount rebecca
mount -o bind /media/john/Rebecca /var/www/html/tto18

It is owned by root and has 755 permissions. Rebooting, I found that the bind mount was not active. In Linux Mint 19.1, it is now necessary to use systemd to start such items as indicated in which gives a tutorial. I followed this and have a working startup.

* OCLUG live distro

* viewing Comment information in a JPG file browser

  • This investigation was prompted by a need to quickly check the captions saved in JPG files. After some exchange on the linux _at_ list, I recorded what I found, including a nice simple tool built on the feh package. See scanjpgwoes.pdf. Because the Irfanview program for Windows (32 bit particularly) is useful for both Linux and Windows, documentation of how to use it to view JPG Comments in full-screen mode is presented separately as viewjpgcmt.pdf.

* removing restrictions on pdf files

  • TD seems in 2017 to have started to put restrictions on pdf statement files. It is useful to be able to delete boilerplate and add in payment records using pdfshuffler. Here is a recipe. fixpdfrestrictions.pdf
technical.txt · Last modified: 2019/04/16 12:27 by jcnash