We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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?
to your account
shell.cp('-R', , dest) fails with the following error:
cp: copyFileSync: could not write to dest file (code=EACCES):
The text was updated successfully, but these errors were encountered:
Can we get a little more context? For one, the actual code used to produce the error, as your snippet is missing a sample. For two, is where you're trying to write a valid target?
Sorry, something went wrong.
Steps to reproduce it:
mkdir -p a/b
echo "text" >> a/b/c.txt
chmod -R -w ./a
And I have the following script to copy /tmp/a to a new directory.
cp('-R', '/tmp/a/*', '/tmp/newdir')
wang@adnmacsg013:/tmp> shjs script.js
cp: copyFileSync: could not write to dest file (code=EACCES):/tmp/newdir/b/c.txt
That's the exact kind of context I was talking about. Thanks, @leyonh - this will help immensely.
Fix: copy recursively from read only location. (fixes #98)
Fix cp from readonly source (#870)
This is a redo of PR #555.
This rebases, cleans up a test, and fixes a bug (the original PR uses `fs.chown()` instead of `fs.chownSync()`).
Successfully merging a pull request may close this issue.