Docker container can't create directory in '/var/www' due to read-only file system, even after permissions changes

Subject: Docker mount error: Can’t create directory under ‘/var/www’ despite changing permissions

Hello,

I’m using Ubuntu 22.04 and trying to run a bitcoind container that needs to write to a directory under ‘/var/www’. I’m getting the error: ‘error while creating mount source path ‘/var/www/app/prod/brc-vesting-contract/.cache/stacks-devnet-1708158157/conf’: mkdir /var/www: read-only file system’ (/var/www/ is the server dir not in the docker container)

I’ve tried setting permissions to 777 and 765, but nothing seems to work. Has anyone else faced this? Are there specific things I should check beyond standard file permissions?

Thanks in advance!

How woulc you answer your own question if someone else asked you the same? :slight_smile: You shared a final state, but nothing about how you got there so there is no way to point out what you did wrong. If th filesystem is read-only, that means there is no way to write that filesystem regardless of what permissions you try to set. It is not about file permissions at all.

Please, share more about what you did exactly to get this error and share configuration files and commands, everything that can be shared publicly. Please, don’t forget to format your inserted source codes: How to format your forum posts