I tried installing the aws command line tool to run the command
aws
on linux
i tried installing it using pip but I get an error
http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os
/bin/aws: Permission denied
whenever I run the command
aws help
what should I do?
The output of ls -l /bin/aws shows:
-rw-r--r--. 1 root root 814 Oct 22 18:09 /bin/aws
Which means you have read/write permissions, but no execute permissions. To fix that, you have to run chmod like this:
chmod 755 /bin/aws
After this the output of ls -l /bin/aws should show:
-rwxr-xr-x. 1 root root 814 Oct 22 18:09 /bin/aws
The x means you also have execute permissions now. Also other users will have execute permission. If there are no other limitations, other users can execute it too.
I had the same issue, and couldn't get it to work.
I uninstalled it using the directions on the aws site
I then installed it using homebrew on linux instead, and it works fine:
# as of writing installs aws-cli v2.X
brew install awscli
Related
I'm running pip various versions of pip over 20.X. For some reason, the --build option was removed from these later versions for install. I want to change the location of the pip builds because /tmp is occasionally cleaned up mid-install by a Jenkins plugin that cleans /tmp. Please don't tell me to disable the plugin :)
It's documented that setting TMPDIR environment variable will allow me to set the build directory. When I run in verbose mode, I still see /tmp being used for req-tracker and unpack folders.
What am I doing wrong? How can I change the build directory for pip install?
Setup of virtualenv
VENV=$(mktemp -d venv.XXXXXXX)
python -m venv $VENV
. $VENV/bin/activate
export TMPDIR=$VENV/build
python -m pip install --verbose -r requirements.txt
I stopped the job and I see folders newly created in /tmp
$ lt /tmp/
total 116
drwx------ 47 dom.larosa dom.larosa 4096 Feb 17 06:54 pip-build-sx9op49f
drwx------ 2 dom.larosa dom.larosa 4096 Feb 17 06:54 pip-3at9dsy4-record
I see nothing in TMPDIR which is where I would like the temporary build directories to be
$ lt $VENV/build
ls: cannot access 'venv.WFWImFB/build': No such file or directory
I'm using an Ubuntu server to run npm install.
I have to use an account which is not sudoer to run services.
I would say this is a service account.
However, when I type gcc --version, it show permission denied.
-bash: /usr/bin/gcc: Permission denied
I found out that gcc is in charge of root account.
So my question is that is there any way I can just use gcc to run npm install without changing any permission?
I'm not allowed to give sudo permission to this service account.
I ran "ls -lah /usr/bin/gcc" and the result is
lrwxrwxrwx 1 root root 5 May 21 2019 /usr/bin/gcc -> gcc-7
Getting the error Error: This command has to be run under the root user. when I try to install in Fedora as root user. Tried in different ways:
Sun May 20 20:18:57 kbsbng#tr
$ sudo yum install mod_ssl
Error: This command has to be run under the root user.
Sun May 20 20:19:00 kbsbng#tr
$ sudo bash
Sun May 20 20:19:03 root#tr
$ yum install mod_ssl
Error: This command has to be run under the root user.
Sun May 20 20:19:15 root#tr
$ su -
[root#tr ~]# yum install mod_ssl
Error: This command has to be run under the root user.
Is there any security setting that is causing this? I am trying all of the above commands by remotely sshing to the machine.
Your root user seems to be corrupted. If user group of root is assigned something out of root (or defined groups in visudo), it'll not perform.
This will solve your problem since you'll be setting user root to group root.
usermod -g root root
usermod -G root root
after entering this, logout and login.
I found another question with the same headline, however, I suppose my case is a bit different.
In an attempt to setup the new project, I needed to install nodejs. I realised that it worked only when used with sudo. For eg. sudo npm
Furthermore, I visited the link https://docs.npmjs.com/getting-started/fixing-npm-permissions and performed
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
to change default directory permissions.
Now because I had to sudo npm here as well, I ran
sudo chown -R $(whoami) $(sudo npm config get prefix)/{lib/node_modules,bin,share}
Post this, whenever I try to use sudo, I get this error -
sudo: effective uid is not 0, is sudo installed setuid root?
I understand that my setup for npm should have been better and off root, but I am a Linux novice.
Any help would be appreciated. :)
More information -
ls -l $(which sudo) gives => ---s--x--x. 1 dev root 123832 Aug 13 2015 /usr/bin/sudo
The problem is that you probably changed permissions to the directory /usr/bin.
To resolve that :
1) First be sure that root is owner of this directory /usr/bin :
chown root:root /usr/bin
2) and change permission for this directory :
chmod u+s /usr/bin/sudo
If anyone is still experiencing problems with sudo, I was able t solve it by checking the shell access of the account in WHM. I received the same error because the account had Jailed Shell restrictions. I set it to normal shell and the error was gone.
Issue:
sudo: effective uid is not 0, is sudo installed setuid root?
Noticed:
---s--x--x. 1 dev root 123832 Aug 13 2015 /usr/bin/sudo
user and group should be root and the sudo file should have setuid
Should be
---s--x--x. 1 root root 123832 Aug 13 2015 /usr/bin/sudo
and also double
I installed Node.js via the precompiled package but I can't access it correctly via the Terminal.
> node
does not work instead I have to type:
> sudo /usr/local/bin/node
My $PATH reads:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin
What do I need to configure?
I am running OSX 10.10 (14A299l) (XCode6 Beta 4 is installed)
If you compiled this package as root it is likely that the file structure all has root ownership. What do you see when you type,
ls -l /usr/local/bin/
If the node.js folder says something like root:root before it then you need to change the permissions via
chmod -R user:user /usr/local/bin/node....