Cacti install problem on Directory Permission Checks

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

Moderators: Moderators, Developers

Author
Message
ciscotester
Posts: 7
Joined: Mon Apr 15, 2019 1:36 am

Cacti install problem on Directory Permission Checks

#1 Post by ciscotester » Mon Apr 15, 2019 1:54 am

Hello dears,

I'm trying to install cacti v1.2.2 on centos7 and get this problem on Directory Permission Checks page:


Required Writable after Install Complete
/usr/share/cacti/log/ Not Writable

Please help me to solve this problem.
Thank you
Attachments
cacti_errror.JPG
cacti_errror.JPG (127.09 KiB) Viewed 2257 times

netniV
Cacti Guru User
Posts: 3132
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti install problem on Directory Permission Checks

#2 Post by netniV » Mon Apr 15, 2019 7:41 am

You will need to check the permissions and SELinux context. They should be correct if you are using the package version. If this is a manual installation, make sure the website user/group has write access to that folder and that the context is http_content_rw (I think that is the name).

mmccaugh
Cacti User
Posts: 92
Joined: Mon Apr 09, 2018 1:37 pm

Re: Cacti install problem on Directory Permission Checks

#3 Post by mmccaugh » Mon Apr 15, 2019 1:42 pm

viewtopic.php?f=6&t=59316

Have a look at this, I wrote it a while back, it may be helpful.

ciscotester
Posts: 7
Joined: Mon Apr 15, 2019 1:36 am

Re: Cacti install problem on Directory Permission Checks

#4 Post by ciscotester » Tue Apr 16, 2019 4:25 am

netniV wrote:You will need to check the permissions and SELinux context. They should be correct if you are using the package version. If this is a manual installation, make sure the website user/group has write access to that folder and that the context is http_content_rw (I think that is the name).
Dear,
Thanks for your response

I have checked SELinux and that is disabled. I think there is another reason for this problem.

can you explain a little more?

mmccaugh
Cacti User
Posts: 92
Joined: Mon Apr 09, 2018 1:37 pm

Re: Cacti install problem on Directory Permission Checks

#5 Post by mmccaugh » Tue Apr 16, 2019 1:59 pm

You have checked the permissions on the cacti tree starting at the webroot I assume right? The simplest answer here is that the user running the apache daemon legitimately doesn't have write permission to this directory.. Though SELinux is far more often the culprit as that's not as simple as a simple ls -al to spot.

From /usr/share do a ls -alR cacti and post the results?

As well as a ps -ef|grep httpd

netniV
Cacti Guru User
Posts: 3132
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti install problem on Directory Permission Checks

#6 Post by netniV » Wed Apr 17, 2019 3:32 am

You may be experiencing the bug with the installer when the default paths are not present but the overridden ones are. That will hopefully be resolved in 1.2.4, though I haven't had time to actually implement a fix yet.

mmccaugh
Cacti User
Posts: 92
Joined: Mon Apr 09, 2018 1:37 pm

Re: Cacti install problem on Directory Permission Checks

#7 Post by mmccaugh » Wed Apr 17, 2019 2:01 pm

FYI I ran into this issue (Or similar) on my fresh 1.2.3 install, and after checking everything I could think of I logged in from a different browser and it proceeded fine.. So I do not know if my browser was caching something silly or what, but I closed chrome and loaded from firefox without issue.

mmccaugh
Cacti User
Posts: 92
Joined: Mon Apr 09, 2018 1:37 pm

Re: Cacti install problem on Directory Permission Checks

#8 Post by mmccaugh » Wed Apr 17, 2019 2:17 pm

Same issue on the new remote poller, this time I closed chrome, cleared cache and retried and it also fixed the issue. So something goofy is getting cached by the browser causing this.

Sounds like it's already on the radar, but try clearing your browser cache and resuming the setup to see if it works.

ciscotester
Posts: 7
Joined: Mon Apr 15, 2019 1:36 am

Re: Cacti install problem on Directory Permission Checks

#9 Post by ciscotester » Sat Apr 20, 2019 7:50 am

mmccaugh wrote:FYI I ran into this issue (Or similar) on my fresh 1.2.3 install, and after checking everything I could think of I logged in from a different browser and it proceeded fine.. So I do not know if my browser was caching something silly or what, but I closed chrome and loaded from firefox without issue.
I've test on firefox but problem still in place.
any other solution Dear?

mmccaugh
Cacti User
Posts: 92
Joined: Mon Apr 09, 2018 1:37 pm

Re: Cacti install problem on Directory Permission Checks

#10 Post by mmccaugh » Mon Apr 22, 2019 8:32 am

Following Mark's suggestion I would ensure /var/www/html/cacti/logs/cacti.log exists and is writable, even though you will never actually use this path as that's not your webroot it is the 'default'.

So if the bug he described is your issue it seems like having the directory there for the permissions check would correct the problem, after the install you could delete it.


ciscotester
Posts: 7
Joined: Mon Apr 15, 2019 1:36 am

Re: Cacti install problem on Directory Permission Checks

#12 Post by ciscotester » Sun Apr 28, 2019 2:33 am

ciscotester wrote:Hello dears,

I'm trying to install cacti v1.2.2 on centos7 and get this problem on Directory Permission Checks page:


Required Writable after Install Complete
/usr/share/cacti/log/ Not Writable

Please help me to solve this problem.
Thank you
I found solution finally. :)
apache uesr need to access permission to root and add to this group:

#>usermod -g apache root
#>usermod -g root apache
#>systemctl restart httpd

and you need to be sure SELINUX is disabled.

and done.

tnx everbody to help.

netniV
Cacti Guru User
Posts: 3132
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti install problem on Directory Permission Checks

#13 Post by netniV » Sun Apr 28, 2019 1:31 pm

You don't need SELinux disabled, you just need to change the context of the folder to http_rw_context

mmccaugh
Cacti User
Posts: 92
Joined: Mon Apr 09, 2018 1:37 pm

Re: Cacti install problem on Directory Permission Checks

#14 Post by mmccaugh » Mon Apr 29, 2019 2:16 pm

I pasted a link to a writeup I did on SELinux above, disabling it outright is not necessary but you do need to properly set the directory contexts..

gertdone
Posts: 25
Joined: Sat Oct 31, 2015 5:10 pm

Re: Cacti install problem on Directory Permission Checks

#15 Post by gertdone » Tue Oct 22, 2019 3:36 am

Having this same issue on a new Centos 8 install. My current system does not have an Apache group and my install will not finish
/usr/share/cacti/log/ Not Writable

[[email protected] etc]# ls -ld /usr/share/cacti/log/
drwxrwxr-x. 2 root root 16384 Oct 21 16:14 /usr/share/cacti/log/

[[email protected] etc]# lid -g Apache
Apache does not exist
so, if I use
#>usermod -g apache root
#>usermod -g root apache
#>systemctl restart httpd

do I remove the group afterward and this install completes or? I have not done anything yet so I am also curious if this is recommended to finish the install? Also, where can I find what should be default permissions for (/usr/share/cacti/log/)?

Thanks in advance

Post Reply