Permission Denied

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

Moderators: Developers, Moderators

clifford64
Posts: 8
Joined: Mon Oct 09, 2017 11:06 am

Permission Denied

Post by clifford64 »

I am fairly new to Linux and unfamiliar with Cacti.

I followed this installation guide https://www.youtube.com/watch?v=cMTUsVJWPIo but I used the newest version of cacti. 1.1.25 or whatever it is. It came out on september 27th. I went through the installation and everything seemed fine. When I go to login the first time, I get a permission denied error. Don't have access to this section of cacti. I am using the admin account with the admin password. I don't know what I am doing wrong. Please help.

Thanks in advance.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Permission Denied

Post by paulgevers »

clifford64 wrote:I get a permission denied error.
Is that a httpd error? Than you need to fix your web server.
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
clifford64
Posts: 8
Joined: Mon Oct 09, 2017 11:06 am

Re: Permission Denied

Post by clifford64 »

paulgevers wrote:
clifford64 wrote:I get a permission denied error.
Is that a httpd error? Than you need to fix your web server.

Well thats just it, I don't know what it is. I just go to the cacti page and when I login for the first time, I use "admin" for the username and "admin" for the password. It then tells me

Permission Denied
You are not permitted to access this section of Cacti.

If you feel that this is an error. Please contact your Cacti Administrator.

So I don't know why it is telling me that. The cacti directory has 775 permissions on it and it is owned by www-data. I have tried it with 777, but it didn't seem to have done anything.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Permission Denied

Post by paulgevers »

clifford64 wrote:Well thats just it, I don't know what it is. I just go to the cacti page and when I login for the first time, I use "admin" for the username and "admin" for the password. It then tells me

Permission Denied
You are not permitted to access this section of Cacti.
Well, that clearly is a cacti message, not a message from your web server.

Are you by any chance running Debian? In that case, did you read the README.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
clifford64
Posts: 8
Joined: Mon Oct 09, 2017 11:06 am

Re: Permission Denied

Post by clifford64 »

paulgevers wrote:
clifford64 wrote:Well thats just it, I don't know what it is. I just go to the cacti page and when I login for the first time, I use "admin" for the username and "admin" for the password. It then tells me

Permission Denied
You are not permitted to access this section of Cacti.
Well, that clearly is a cacti message, not a message from your web server.

Are you by any chance running Debian? In that case, did you read the README.Debian?

I am running Ubuntu 17.04
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Permission Denied

Post by paulgevers »

clifford64 wrote:I am running Ubuntu 17.04
Same thing. In Debian (and Ubuntu) the password is not the default "admin" due to security concerns. You can find the initial password for admin in /etc/cacti/debian.php
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
clifford64
Posts: 8
Joined: Mon Oct 09, 2017 11:06 am

Re: Permission Denied

Post by clifford64 »

paulgevers wrote:
clifford64 wrote:I am running Ubuntu 17.04
Same thing. In Debian (and Ubuntu) the password is not the default "admin" due to security concerns. You can find the initial password for admin in /etc/cacti/debian.php
I did not see anything related to the admin password. I only saw the ability to specify the database type and database users and such. The admin username and admin password will authenticate, but I get the error that I stated in my previous post. If I try to use a different user, such as the one I have created for the database, it tells me "login invalid"
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Permission Denied

Post by paulgevers »

User: admin
Password: the same as used to connect to the database, and as such stored in /etc/cacti/debian.php in the password field.

I recommend you change the admin password after you log in successfully.
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
clifford64
Posts: 8
Joined: Mon Oct 09, 2017 11:06 am

Re: Permission Denied

Post by clifford64 »

paulgevers wrote:User: admin
Password: the same as used to connect to the database, and as such stored in /etc/cacti/debian.php in the password field.

I recommend you change the admin password after you log in successfully.

Ok, for example. Lets same I created a user named cactiuser and gave them GRANT ALL ON cacti within mysql. I then go into the debian.php file and the other files that are needed and specify that the database is cacti, the username is cactiuser, and the password is password (not actual password, just using it for the example). When I navigate to the cacti page to login, When specifying cactiuser as username and password as password, I get "invalid username/password." When I specify admin and a password of password because it is whats in debian.php, I still get "invalid username/password." If I specify admin for the username and admin for the password, it authenticates and takes me to a new page stating how I don't have permissions as I have explained in a previous post.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Permission Denied

Post by paulgevers »

Ah, sorry, you didn't install the cacti package? Than I haven't said anything.

I thought (but I never install cacti manually, always from the Debian/Ubuntu package) that on initial install you get asked questions before you need to log in (the installi is without credentials, that is the part I don't like for Debian/Ubuntu, so I fixed that). I believe the install asks you which password to use for admin, but I may be wrong.

Anyways, you can also set the password in MySQL/MariaDB if admin/admin is really not working for you:

Code: Select all

UPDATE user_auth SET password=md5('your_new_password'), must_change_password='' WHERE id=1;
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
clifford64
Posts: 8
Joined: Mon Oct 09, 2017 11:06 am

Re: Permission Denied

Post by clifford64 »

paulgevers wrote:Ah, sorry, you didn't install the cacti package? Than I haven't said anything.

I thought (but I never install cacti manually, always from the Debian/Ubuntu package) that on initial install you get asked questions before you need to log in (the installi is without credentials, that is the part I don't like for Debian/Ubuntu, so I fixed that). I believe the install asks you which password to use for admin, but I may be wrong.

Anyways, you can also set the password in MySQL/MariaDB if admin/admin is really not working for you:

Code: Select all

UPDATE user_auth SET password=md5('your_new_password'), must_change_password='' WHERE id=1;

I was able to change the password from the default admin to something, but I am still getting the same error of:
Permission Denied
You are not permitted to access this section of Cacti.

If you feel that this is an error. Please contact your Cacti Administrator.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Permission Denied

Post by paulgevers »

clifford64 wrote:I was able to change the password from the default admin to something, but I am still getting the same error of:
Permission Denied
You are not permitted to access this section of Cacti.

If you feel that this is an error. Please contact your Cacti Administrator.
Sorry, I am out of ideas.
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
clifford64
Posts: 8
Joined: Mon Oct 09, 2017 11:06 am

Re: Permission Denied

Post by clifford64 »

paulgevers wrote:
clifford64 wrote:I was able to change the password from the default admin to something, but I am still getting the same error of:
Permission Denied
You are not permitted to access this section of Cacti.

If you feel that this is an error. Please contact your Cacti Administrator.
Sorry, I am out of ideas.
It is possible that I installed it incorrectly or something. The guide I used only had 800 views, but it was the only one that has worked so far. Do you know of any guides that are easy to follow?
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Permission Denied

Post by paulgevers »

Yes,

Code: Select all

apt install cacti
You're on Ubuntu, you know? :)

Maybe you need to remove all traces of your manual actions for this to work, see my signature.
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
clifford64
Posts: 8
Joined: Mon Oct 09, 2017 11:06 am

Re: Permission Denied

Post by clifford64 »

paulgevers wrote:Yes,

Code: Select all

apt install cacti
You're on Ubuntu, you know? :)

Maybe you need to remove all traces of your manual actions for this to work, see my signature.
Wow, thank you very much. I don't know why I was having so much trouble with this before. I think it was from using an ubuntu 14.04 book to try and install it. Your method had me up and running in a couple minutes.

Thanks again.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest