Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPERM: operation not permitted #49

Closed
tomaschyly opened this issue Jun 18, 2019 · 5 comments
Closed

EPERM: operation not permitted #49

tomaschyly opened this issue Jun 18, 2019 · 5 comments

Comments

@tomaschyly
Copy link

tomaschyly commented Jun 18, 2019

Since updating to v3 I get this error:

EPERM: operation not permitted, rename 'C:\Users\Tomas\AppData\Roaming\MiArt\var\config\default.json.727851267' -> 'C:\Users\Tomas\AppData\Roaming\MiArt\var\config\default.json'

I use write-file-atomic to save app config inside Electron v5 app. This error only happens on Windows, on MacOS everything works fine. Also if I downgrade back to 2.4.3, it works on Windows again.

Anything I can do to help solve this issue? Or is it something on my end?

@p3x-robot
Copy link

it is the same error on a SNAP app Electron as well:
sindresorhus/configstore#63

patrikx3/onenote#68

@p3x-robot
Copy link

SNAP does not allow to change the owner, could you tell is how to disable the chown ?

@develar
Copy link
Contributor

develar commented Jul 11, 2019

To disable, just pass {chown: false, mode: false}. I am going to send PR to conf module.

writeFileAtomic.sync(this.path, data, {chown: false, mode: false})

@tomaschyly
Copy link
Author

I have checked my case again. And I noticed, that first time I can edit the file, but any subsequent edits show that error. It seems like they do not release control of the file after they are done editing.
Not sure and do not have the time to check it myself, I have too much other work to deal with.
Does the team not check issues here on github?

@tomaschyly
Copy link
Author

I have recently tried to use the package again, now latest v3.0.1.
It is possible that they fixed it there, or other updates have dealt with this issue, but for me it seems to be working on multiple devices now. I have since then updated everything, including Electron to v7.

Since there is still no response, I will close this now. To others with this issue, try to test it again, maybe it will work now for you too.

isaacs pushed a commit that referenced this issue Feb 24, 2020
…or mode

Fixes #49.

EDIT(isaacs): Rebased latest, added tests to get back to 100% coverage.

PR-URL: #55
Credit: @kevva
Close: #55
Reviewed-by: @isaacs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants