Skip to content

Error: EACCES: permission denied, mkdir #29

Open
@snake-py

Description

@snake-py

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions