Page 1 of 2

Install Issue - Permission Denied

Posted: Mon Dec 16, 2013 6:01 pm
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.

Re: Install Issue - Permission Denied

Posted: Mon Dec 16, 2013 8:25 pm
by scottwilkerson
Can you post the output of

Code: Select all

pwd
ls -l ./configure

Re: Install Issue - Permission Denied

Posted: Mon Dec 16, 2013 8:56 pm
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*

Re: Install Issue - Permission Denied

Posted: Tue Dec 17, 2013 12:07 am
by scottwilkerson
ok, one more

Code: Select all

ls -l /bin/sh

Re: Install Issue - Permission Denied

Posted: Tue Dec 17, 2013 12:40 am
by Gallitin
That returns:

Code: Select all

lrwxrwxrwx 1 root root 4 Jul  5 11:54 /bin/sh -> bash*

Re: Install Issue - Permission Denied

Posted: Tue Dec 17, 2013 10:34 am
by sreinhardt
Let's check if /tmp is executable:

Code: Select all

mount

Re: Install Issue - Permission Denied

Posted: Tue Dec 17, 2013 10:58 am
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)

Re: Install Issue - Permission Denied

Posted: Tue Dec 17, 2013 11:43 am
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.

Re: Install Issue - Permission Denied

Posted: Tue Dec 17, 2013 12:02 pm
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

Re: Install Issue - Permission Denied

Posted: Tue Dec 17, 2013 12:05 pm
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/