Apologies in advance if this is a rookie question, I am brand new to Node.js and I am trying to learn. I have successfully installed Node on my laptop and added the folder to my PATH variable:
export PATH=$PATH:/usr/local/bin
However, when I try to run a simple program to test, I get the following error:
-bash: /usr/local/bin/node: Permission denied
I got it to work by granting 755 on /usr/local/bin but I am not sure if that is a good idea as it grants everyone read and execute rights on a bin directory!
Does anyone know of a better way to do this? Is my concern even justified?
Thanks in advance for your kind help.
it is probably an owner issue, check this out: https://docs.npmjs.com/getting-started/fixing-npm-permissions
The last suggestion on using Brew is probably the best option.
Related
As the title suggests I am receiving the error
/usr/bin/env: node: Permission denied
when trying to run
npm run build
for my react app. The following link is the leadup to this point with all that I've done and tried, not to be included here for the sake of not duplicating questions Error with react-scripts in npm run build.
Additionally, I have viewed this posting, Getting Error /usr/bin/env: node : Permission Denied, and it was unhelpful to me.
Any help is much appreciated.
I was working in a dockerized node environment and noticed that the mounted source code directory had different ownership (running the container as root) from host environment. Changing the ownership using:
chown -R root:root .
made the error go away for me!
The issue ended up being a matter of file ownership. Root was the owner of many things for the project rather than my profile. Simply changed the ownership from root to me.
For me, re-installing node with NVM solved the issue:
Install nvm
nvm install 14
nvm use 14
you should running command as super user sudo npm run build
For anyone else hitting this, there is another avenue of investigation. There might be another factor affecting execute permissions. There's an exec flag on drive mounts to enable script execution (neat safety feature for automounted usb sticks!). So if your code is on a drive that you've mounted, you need that option set to run scripts on it. Tell-tale signs are the permissions on the script being correct (appropriate user, group and execute bits set), but it still complaining about the shebang line (1st line) being the permission denied. Also, if you type mount, you might see noexec set on the mount point where your source code is (it may not show here if exec is set). How your mount is set up varies greatly, but a place to start is your /etc/fstab.
So this is my first time asking a question on here or any forum. I've tried looking into this problem but none of the questions asked or the solutions to those questions really applied to my problem. ill try to be as specific as i can. I'm new to Linux, I've dual booted ubuntu 16.04 on my 64bit laptop. I'm trying to create and configure an openvpn and in trying to unzip "server.conf.gz" i run into this
bash: /etc/openvpn/server.confg: Permission denied
and don't know why. Please if anyone knows what i have to do please help me out, i would really appreciate it. Thank you for taking the time to read through all that.
Use sudo before the command or root user to execute that command. Your current user doesn't have permission to write in /etc/openvpn directory.
Please use:
gunzip server.conf.gz -c /etc/openvpn
or
sudo gunzip server.conf.gz -c /etc/openvpn
hope it will works.
Brace yourself, I'm a Windows admin messing with a CentOS 6 server.
Let's start by saying I know very little about Linux.
I'm trying to load an rmmagent, GFI/MaxFocus's agent. It's failing the dependency check on kernel-utils and unzip.
error: Failed dependencies:
kernel-utils is needed by rmmagent-1.0.2.centos6-1.2.x86_64
unzip is needed by rmmagent-1.0.2.centos6-1.2.x86_64
I Googled myself to death, but I think I just don't know enough about Linux to make this go.
Can someone educate me or point me to the right place to learn how to do this? Thanks!
-Jeff
PS: I got unzip installed without issue.
We had the same issue. We spoke to the LogicNow support and they give us this solution:
wget -c ftp://rpmfind.net/linux/Mandriva/official/9.1/i586/Mandrake/RPMS/ksymoops-2.4.8-1mdk.i586.rpm
yum install ksymoops-2.4.8-1mdk.i586.rpm
I am trying to instal git on buehost shared hosting server.
I am following this blog to install
http://www.willjackson.org/blog/installing-git-bluehost-shared-hosting
But when i run the make command i get the following error..
Please help me out
You have not permission to compile applications on shared hosting. I think you should try VPS.
UPDATE:
In your tutorial author unzips git-master.zip to ~/.local/scr/git-master. So you have git-master in ~. Maybe should try again step by step? I think this video can help you.
There are a few other questions on Stack Overflow about this and I do understand that, but none of them are giving me an idea of why im getting the "Could not open input file".
I have it setup so I get an email everytime a crons runs (im using cPanal to set the crons) but all I get is:
Could not open input file: /home/methodjs/classified/emailNotifications.php
Because is the first time i'm using crons jobs I have no idea what this means or how fix it.
My command line is:
/usr/local/bin/php $HOME/classified/emailNotifications.php
Am I doing something wrong? Thanks for any help. By the way, i'm sure thats the right path to PHP because thats what I got from my host.
ensure file is located here:
/home/methodjs/classified/emailNotifications.php
try to execute from commandline:
/usr/local/bin/php /home/methodjs/classified/emailNotifications.php
what appears?
ensure your php file has execution rights
chmod 755 /home/methodjs/classified/emailNotifications.php
The error appears either file is not present at given path or proper permission are not set for file. It can be checked by navigating to path and ll for checking permission.
All,
This problem started occurring on all my 20 Kubuntu machines after an update from Ubuntu! Since Ubuntu is Debian based not sure if Debian or Ubuntu is to blame, so investigating!
Debian users, if this is also impacting you please reply so we can investigate further!
Cheers!