Write access to a subdirectory within a read-only directory

I have a home server for my website that is running on a mounted image. I mount the image as follows:

sudo mount -o loop,offset=19489299 raspbian-stretch-lite.img

I then mount my static website folder, www, inside the image as read only:

sudo mount --bind www/ /mnt/usr/share/nginx/www
sudo mount -o bind,rebind,ro /mnt/usr/share/nginx/www

Unfortunately my repo folders for my home git server are inside www (i.e., www/git/). This has been an issue because I cannot push any commits back to the server (since the repo folder is in read-only mode). Is there any way I can have my git folder (along with all the repos, of course) have write permissions but have all the rest of the folders/files inside www remain in read-only mode?

Server Fault Asked by pairwiseseq on December 29, 2020

0 Answers

Add your own answers!

Related Questions

How to run clamd by systemd as daemon on Centos 7

1  Asked on November 18, 2021 by vczm


How to correctly deploy Adobe Reader 9.1

4  Asked on November 16, 2021 by ben-gillam


duplicate cache pages: Varnish

2  Asked on November 16, 2021 by sukhjinder-singh


NFS Server hangs on proxmox

1  Asked on November 16, 2021 by zarex


Azure App Service on Linux or Windows

1  Asked on November 16, 2021


Apache MPM_Prefork Setting for high performance

0  Asked on November 16, 2021 by anthonyinit


Disable TLS 1.3 on IIS

1  Asked on November 16, 2021 by user9099944


Ask a Question

Get help from others!

© 2022 All rights reserved.