Install Issue - Permission Denied

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Gallitin
Posts: 7
Joined: Mon Dec 16, 2013 5:58 pm

Install Issue - Permission Denied

Post by Gallitin »

I'm following the guide here for CentOS 6 install: http://assets.nagios.com/downloads/nagi ... Source.pdf

On page 2 it says to run this command: "./configure --with-command-group=nagcmd"

I then get the error: "-bash ./configure: Permission Denied", but I'm logged in a root.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Install Issue - Permission Denied

Post by scottwilkerson »

Can you post the output of

Code: Select all

pwd
ls -l ./configure
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Gallitin
Posts: 7
Joined: Mon Dec 16, 2013 5:58 pm

Re: Install Issue - Permission Denied

Post by Gallitin »

Ok, pwd returns:

Code: Select all

/tmp/nagios-4.0.2
ls -l ./configure returns:

Code: Select all

-rwxrwxr-x 1 root root 261578 Nov 25 07:16 ./configure*
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Install Issue - Permission Denied

Post by scottwilkerson »

ok, one more

Code: Select all

ls -l /bin/sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Gallitin
Posts: 7
Joined: Mon Dec 16, 2013 5:58 pm

Re: Install Issue - Permission Denied

Post by Gallitin »

That returns:

Code: Select all

lrwxrwxrwx 1 root root 4 Jul  5 11:54 /bin/sh -> bash*
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Install Issue - Permission Denied

Post by sreinhardt »

Let's check if /tmp is executable:

Code: Select all

mount
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Gallitin
Posts: 7
Joined: Mon Dec 16, 2013 5:58 pm

Re: Install Issue - Permission Denied

Post by Gallitin »

The command "mount" returned:

Code: Select all

/dev/sda3 on / type ext4 (rw,usrjquota=quota.user,jqfmt=vfsv0)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sdb1 on /disk2 type ext3 (rw,usrjquota=quota.user,jqfmt=vfsv0)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/usr/tmpDSK on /tmp type ext3 (rw,noexec,nosuid,loop=/dev/loop0)
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/etc/named on /var/named/chroot/etc/named type none (rw,bind)
/etc/named.rfc1912.zones on /var/named/chroot/etc/named.rfc1912.zones type none (rw,bind)
/usr/lib64/bind on /var/named/chroot/usr/lib64/bind type none (rw,bind)
/etc/named.iscdlv.key on /var/named/chroot/etc/named.iscdlv.key type none (rw,bind)
/etc/named.root.key on /var/named/chroot/etc/named.root.key type none (rw,bind)
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Install Issue - Permission Denied

Post by sreinhardt »

You have noexec set as a flag for the /tmp mount. You can move the installer somewhere else, like ~/ that would be executable, or alter your fstab so that, that flag is not used.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Gallitin
Posts: 7
Joined: Mon Dec 16, 2013 5:58 pm

Re: Install Issue - Permission Denied

Post by Gallitin »

Ok I started in the ~ directory this time. I've now made it all the way to the make install-webconf point and I'm getting an error:

Code: Select all

root@ip-173-201-37-204 [~/nagios-4.0.2]# make install-webconf
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file `/etc/httpd/conf.d/nagios.conf': No such file or directory
make: *** [install-webconf] Error 1
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Install Issue - Permission Denied

Post by sreinhardt »

Do you have apache installed via yum already? also if you could run:

Code: Select all

ll /etc/httpd
ll /etc/httpd/conf.d/
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked