0

I'm getting the error "bash: node_modules/.bin/sequelize: Permission denied" while following the instructions at http://docs.sequelizejs.com/manual/tutorial/migrations.html. This is my first time using Sequelize CLI and I'm fairly new to Linux. Can someone tell me how to execute the command "node_modules/.bin/sequelize init" without getting this error? This command is under the Bootstrapping section at the top of the provided link.

I tried sudo and su but that hasn't helped with this situation. Thanks. When I try

ls -l node_modules/.bin/sequelize

I get as output

lrwxrwxrwx 1  <account logged in> <account logged in> 30 Jul 19 23:46 node_modules/.bin/sequelize -> ../sequelize-cli/lib/sequelize

so I think the file has read, write, and execute permissions for users, groups, and others.

If I try ls -l sequelize the output is ls: cannot access 'sequelize': No such file or directory.

  • Have you tried applying the execute bit to that file? Is the filesystem containing sequelize mounted with noexec? – dsstorefile1 Jul 21 '18 at 22:45
  • No I've learned a bit about commands used for those kinds of questions but it's been a while for me so I don't remember how to use them exactly and not something I've ever had to use in a real situation. – HR 8938 Cephei Jul 21 '18 at 22:50
  • Please see the last paragraph to the body of my question. It's been updated. – HR 8938 Cephei Jul 21 '18 at 23:02
  • 1
    Do ls -l node_modules/sequelize-cli/lib/sequelize. That is the file that the link points to. Or do as @dsstorefile1 suggests: ls -lH node_modules/.bin/sequelize. – Jos Jul 21 '18 at 23:17
  • 1
    "ls -l node_modules/sequelize-cli/lib/sequelize" gives me "-rw-r--r-- 1 3771 Feb 15 00:33 node_modules/sequelize-cli/lib/sequelize" – HR 8938 Cephei Jul 21 '18 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.