On 9/17/26 08:10, Sylvain Saboua wrote:
On my server I allocated 230GB on the SSD for
the /var/www fstab directory.
But most of my relevant data files will be on a
single 16TB HDD partition mounted on the /mnt
directory.

Say I wish to use nextcloud or otherwise make a
web server mirror of my sftp server: is there a
straightforward way to serve files located on
the /mnt partition ?

I suppose that I am not the only one with such
a use case. Has this been though about in
designing httpd(8) ? Is the current situation a
deliberate limitation or a temporary caveat ?

Cheers

First of all, /mnt is a really bad place to put a permanent mount.
It is usually used for TEMPORARY mountings...and if it is a shared
machine, someone else will probably clobber your mount, and if it is a
private machine, you might make the same mistake when you are working
on a shared machine.  So fix this.  And as long as you are fixing it...

...But since we have decided (or I have declared, perhaps unconvincingly)
that /mnt is a REALLY BAD place to put your 16TB drive, mount it at
/var/www/bigdisk or similar and avoid the chroot problem.  Now you can
create a symlink (but not /mnt) where you want it to appear to be,
pointing at your actual mount point.

Removing the chroot option from httpd is NOT a solution I'd recommend.

If you really need to pull a non-chroot file system into the chroot,
use NFS to share the old location to localhost.  There's a performance
penalty, so put the actual mount in the more intensive location, IF
performance is a concern.  Another feature of an NFS mount is that you
can make the NFS mount Read Only for the chroot, but RW for the "safer"
applications.

Nick.

Reply via email to