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

copy(src, dst) fails with EACCES when copying a read-only directory with content on MacOS #599

Closed
mbargiel opened this issue Jul 6, 2018 · 0 comments

Comments

@mbargiel
Copy link

mbargiel commented Jul 6, 2018

Copying a directory using the recursive copy function fails with permission error on MacOS if the target is (or contains) a read-only directory with contents.

Repro steps:

  1. Create the following hierarchy:
root
|- file
\- subdir
   \- nested_file
  1. Make all files and folders read-only
  2. Run the following node snippet:
const fse = require('fs-extra')
fse.copy('root', 'target')
  • Expected: success
  • Actual: the target directory is created but it is empty, and the following is printed: (node:5199) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: EACCES: permission denied, open 'target/file'
  • Operating System: Mac OS 10.13.5
  • fs-extra version: 6.0.1
@mbargiel mbargiel changed the title copy(src, dst) fails with PermissionError when copying a read-only directory with content copy(src, dst) fails with PermissionError when copying a read-only directory with content on MacOS Jul 6, 2018
@mbargiel mbargiel changed the title copy(src, dst) fails with PermissionError when copying a read-only directory with content on MacOS copy(src, dst) fails with EACCES when copying a read-only directory with content on MacOS Jul 6, 2018
@RyanZim RyanZim added this to the 7.0.0 milestone Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants