unzipper icon indicating copy to clipboard operation
unzipper copied to clipboard

Error: EACCES: permission denied, mkdir

Open snake-py opened this issue 6 months ago • 0 comments

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, '/') })
}

snake-py avatar Aug 12 '24 10:08 snake-py