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

While running a nodejs application that is managed by pm2 I cannot manipulate a file on disk #53

Open
iii-james opened this issue Feb 15, 2022 · 4 comments

Comments

@iii-james
Copy link

Description
When I try to delete a file I get the error below. Seems to be a rights issue but not sure where the issue is coming from so I can address it.
Error: EPERM: operation not permitted, unlink my-file.txt

Steps to Reproduce

  1. while pm2 is managing my app I cannot delete(unlink) a from disk
  2. if I stop pm2 (pm2 stop "my-app") and just start it using "node my-app.js" then make the request the file deletes

Environment

nvm@1.1.9
nodejs@14.7.6
pm2-installer@3.3.1
pm2@5.1.2
windows10
@iii-james
Copy link
Author

Also if I npm run remove and npm run deconfigure and install pm2 via npm install pm2 -g the file will delete(unlink). However I need this to run as a service to restart on reboot. Any help would be appreciated.

@Nubebuster
Copy link

Any help would indeed be appreciated. Any fixes? @iii-james

@iii-james
Copy link
Author

iii-james commented Mar 27, 2023

@Nubebuster I think I ended up changing the PM2 Service "Log On" -> "This account" property to use the domain\username instead of username@domain.

image

@leonissenbaum
Copy link

@iii-james wondering how exactly you did that?

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

No branches or pull requests

3 participants