Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.5 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Can't write in directory (on dbconfig.inc.php)

Hi,

I am trying to configure OCS server on Centos 7, i'm getting the below error to configure the OCS server. I have given full access for OCSreports directory. Please anyone help me to solve the issue.

Document root should be writable : /usr/share/ocsinventory-reports/ocsreports

Thanks in advance

Nagesh

asked in OCS Inventory NG server for Unix by (200 points)
reopened by

6 Answers

–1 vote
You look like to install OCS with tar.gz. The solution is really easy : use our rpm :)

https://www.ocsinventory-ng.org/en/rpm-repository-is-available-for-rhelcentosfedora/
answered by (19.2k points)
–1 vote

Now i am able to access the admin console after disabling the SElinux...

Disabled SElinux with the commands :

# vi etc/selinux/config
 
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX= disabled

Save and Close then restart the server.

# shutdown -r now

answered by (200 points)
reshown by
Disable selinux decrease system security : you must not do that !

Our RPM keep selinux configure and adapt rules for OCS.
0 votes
Which one i need to install from the list (EL7 or Fedora26), i'm using Centos 7.
answered by (200 points)
0 votes
Hi

EL7 = CentOS7 so install the el7 rpm

Regards

Frank
answered by (63.3k points)
0 votes

"Our RPM keep selinux configure and adapt rules for OCS." - kapouik

How?  I'd rather install from source.

answered by (550 points)
0 votes
This should do the trick for SELINUX...

chown -R apache:apache /usr/share/ocsinventory-reports/

chown -R apache:apache /var/lib/ocsinventory-reports/

find /usr/share/ocsinventory-reports/ocsreports/ -type f -exec chmod 0644 {} \;

find /usr/share/ocsinventory-reports/ocsreports/ -type d -exec chmod 0755 {} \;

chcon -t httpd_sys_rw_content_t /usr/share/ocsinventory-reports/ocsreports

chcon -t httpd_sys_rw_content_t /usr/share/ocsinventory-reports/ocsreports/upload

chcon -t httpd_sys_rw_content_t /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
answered by (550 points)
 
Powered by Question2Answer
...