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

Error: EACCES: permission denied, mkdir #29

Open
snake-py opened this issue Aug 12, 2024 · 0 comments
Open

Error: EACCES: permission denied, mkdir #29

snake-py opened this issue Aug 12, 2024 · 0 comments

Comments

@snake-py
Copy link

Hey, I am trying to simply unzip a zip file. However, I am getting this permission denied issue. The odd thing is that if I loook at the permission of the folder I set with chmod -R 777 see resulting perm drwxrwxrwx 4 user user 4096 Aug 12 09:41 ejected

Here is the coding:

async function unpackZip(dependency: string) {
  const directory = await unzipper.Open.file(resolve('./ejected/tmp', dependency + '.zip'))
  console.log('Unpacking...', dependency)
  if (!fs.existsSync('./ejected/' + dependency)) {
    fs.mkdirSync('./ejected/' + dependency, { recursive: true })
  }
  directory.extract({ path: resolve('./ejected', dependency, '/') })
}
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

1 participant