Our team is trying to save data in a .json file. I put the file in the deploy folder and was able to read from the file. I then tried writing to the file and was thrown java.nio.file.AccessDeniedException: /home/lvuser/deploy/config.json
. Has anyone found how to write to a file?
Because of the way deploy works, the file gets deployed as admin, but user code runs as lvuser, so it can’t write that file. I’ll create an issue to fix this, but for now you would have to write to a differently named file.
1 Like
If you log in as root and run chmod -R a+rwX /home/lvuser/deploy/
then you are able to use files in the deploy folder
Yes, that does work, but if you redeploy the file it might overwrite that ownership change. In theory that does work, but I did create an issue to deploy as lvuser in the future.
I tested it multiple times, and after deploying again, I was able to write to the file still.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.