'Permission denied' on 1.1.33 installed on Debian 9

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
AlanC
Posts: 1
Joined: Tue Jan 30, 2018 4:12 pm

'Permission denied' on 1.1.33 installed on Debian 9

Post by AlanC »

Hi,

I've installed Cacti 1.1.33 on a Debian 9 server using the instructions given here: https://www.howtoforge.com/tutorial/ins ... -debian-9/

All went well with a few caveats; I could not enable port 161/UDP for snmp agent, for example, but I doubt that's the issue. I worked through the prerequisites and eventually got to the admin login screen, which is where it started to go pear shaped!

Logging in with admin/admin gave the 'Invalid User Name/Password Please Retype' message, which is fair enough; I read that for Debian systems you have to use the DB cactiuser password. This didn't work so I reset it in the database. It now seems to authenticate me (only once though, I have to reset it again for another try) but immediately I get 'Permission Denied. You are not permitted to access this section of Cacti. If you feel this is an error please contact your Cacti Administrator.' Okay I'll give myself a ring...

I read somewhere that this is related to the database version, so I tried to run upgrade_database.php but that gives the error Invalid Cacti version 1.1.33, cannot upgrade to 0.8.8h.

Any suggestions more than welcome.

Here are my versions
System: Linux ptt 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64
PHP: 7.0
Database: 10.1.26-MariaDB-0+deb9u1 Debian 9.1
Apache: 2.4.25 (Debian)

Best regards,
Alan
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: 'Permission denied' on 1.1.33 installed on Debian 9

Post by netniV »

OK so there are several problems to deal with here.
  • SNMP not enabling - Check whether anything is running on your system for port 161 using netstat. Using the right options should also give you the process that is running that. If this is the expected SNMP deamon, it's likely a firewall issue.
  • Authentication - The database user/pass should be set in the include/config.php file. That should not be changing nor should your databsae user password unless you are running something that is forcing a change or have some form of password policy in place that expects an SQL users password to change.

    In a similar fashion, the Cacti admin user password will ask you to change it on first login to ensure that the password has been updated from the distribution version.
  • Version 0.8.8h, this looks like you've got a mixture of 0.8.8h and 1.1.33 mixed up. The fact that the cli/upgrade_database.php is telling you that the current cacti version is 0.8.8h, comes from what it believes it's local sources are.

    You can try to overwrite the 0.8.8h source with the 1.1.33 version and then run through the install once more.

    Failing that, if this is a fresh install, I think Paul will suggest you scrap all that and use his backport which has done the hard work for you. Check his signature for the appropriate links.

    paulgevers
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: 'Permission denied' on 1.1.33 installed on Debian 9

Post by paulgevers »

AlanC wrote:I've installed Cacti 1.1.33 on a Debian 9 server using the instructions given here: https://www.howtoforge.com/tutorial/ins ... -debian-9/
I haven't read it all, but what a crap instructions. Adding random repositories and still needing all the manual work.

As netniV said, just enable the official Debian Backports and you get offcial Debian packages for cacti which should work out of the box (if they don't file bugs against Debian).
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests