'Access is denied' Error During Deployment

So I’ve previously deployed 2 applications successfully using flyctl. While building this app, I was given a warning: WARN failed saving cache to C:\path\.fly\state.yml: open C:\path\.fly\state.yml: Access is denied.. I kind of brushed it off and continued, but when I selected to go ahead and build a postgresql instance, I was given a smilar Error concerning Access: Failed attaching appname to the Postgres cluster appname-db: can't establish agent error saving config file: open C:\Users\path\.fly/config.yml: Access is denied.. Try attaching manually with 'fly postgres attach --app appname appname-db'. It looks like the cluster was build, but wasnt attached? When i try using the suggested command to attach it manually, i get: Error: can't establish agent error saving config file: open C:\path\.fly/config.yml: Access is denied. Couldn’t find anything in the forums, kind of at a loss here. Any suggestions?

Also, I’d like to just point out that right before performing the build, i updated my flyctl to the latest version. Maybe this did something to my permissions? I’m not sure.

Running flyctl doctor gives me: Testing flyctl agent... FAILED (Error: couldn't ping agent: dial unix C:\path\.fly\fly-agent.sock: connect: No connection could be made because the target machine actively refused it.)

Took me a whole day of trouble-shooting just to find the solution. Which as always, was extremely simple. I’m so used to running my commands just in a cmd terminal, I forgot for flyctl (atleast for me) that doesn’t work. You have to use a powershell. So… Yeah. Thank you me! :stuck_out_tongue:

2 Likes