Uploading files to wwwroot directory of app, permission denied, how to do it ?

I have .NET app, and I try making admin page. I need only changing 2 small pictures(1 picture <= 2 Mb)? I don’t need big volume(even 1 Gb will be too much now). I made it. Pictures are in wwwroot/images directory, and when upload, I simple change image in wwwroot/images. Locally it works. But it doesn’t work in production. The error is “permission denied”. Can I do something to add permissions ? Changing Dockerfile and adding something that adds permissions to only wwwroot/images ? Or what is better ?

You’ll want to use a Fly volume, otherwise the files will be lost when you re-deploy.

Thanks for answer, but how can I create volume ? My project is startup, we use free plan, when creating volume, it says that I can’t do it for free, even 1Gb volume(and even 100 Mb will be too much, don’t want to waste resources even for free). But taking into account, that our project is very small, we have to maintain only 2 files, 2 images(other images are not changeable by design), it’s not problem to upload files again on redeploy(these files we always have). So how to make it ? I google it, and as I understand, I should do something like chown myImageDirectory appUser.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.