TransWikia.com

Write access to a subdirectory within a read-only directory

Server Fault Asked by pairwiseseq on December 29, 2020

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?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP