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.12.3 available

The official documentation can be found on https://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

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/
by (22k 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

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.
by (200 points)
0 votes
Hi

EL7 = CentOS7 so install the el7 rpm

Regards

Frank
by (90.4k points)
0 votes

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

How?  I'd rather install from source.

by (570 points)
+1 vote
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
by (570 points)
 
Powered by Question2Answer
...