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

shell.mv does not gracefully handle file permission errors #872

Open
nfischer opened this issue Jul 12, 2018 · 0 comments
Open

shell.mv does not gracefully handle file permission errors #872

nfischer opened this issue Jul 12, 2018 · 0 comments
Labels
bash compat Compatibility issues with bash or POSIX behavior fix Bug/defect, or a fix for such a problem low priority

Comments

@nfischer
Copy link
Member

Originally reported here: #64 (comment) (/CC @akras14)

var shell = require("shelljs");
shell.mv("test", "/");

$: node test.js 
shell.js: internal error
Error: EACCES, permission denied 'test'
    at Object.fs.renameSync (fs.js:554:18)
    at /home/alexk/projects/support/uploader/node_modules/shelljs/src/mv.js:77:8
    at Array.forEach (native)
    at Object._mv (/home/alexk/projects/support/uploader/node_modules/shelljs/src/mv.js:53:11)
    at Object.mv (/home/alexk/projects/support/uploader/node_modules/shelljs/src/common.js:186:23)
    at Object.<anonymous> (/home/alexk/projects/support/uploader/test.js:3:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Basic issue is that / is owned by root, and so the user doesn't have permission to write to that folder.

@nfischer nfischer added fix Bug/defect, or a fix for such a problem low priority bash compat Compatibility issues with bash or POSIX behavior labels Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bash compat Compatibility issues with bash or POSIX behavior fix Bug/defect, or a fix for such a problem low priority
Projects
None yet
Development

No branches or pull requests

1 participant