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

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

/var/lib/ocsinventory/reports/logs not writable [closed]

This problem has been discussed, but not answered some years ago.  Today i ran the update on the ocsreport server and it's now reporting back that /var/lib/ocsinventory-reports/logs is not writable.  SElinux is off, and the route to the directory is all either 777 permissions or owned by www-data:www-data so there's no reason at all for it to not be writable.   Also, to compound the issue, it doesn't seem to matter if I change the log directory to be /var/ocsreports/logs, it still reports back that /var/lib/ocsinventory-reports/logs is not writable.

SELinux is permissive, so warning only, effectively off.
The 777 to the directory was simply a sledgehammer to ensure it was writeable, and yet OCSinventory still thinks it is not writable.
OCSinventory was installed using the setup.sh, and it was not complaining about the un-writable directory until I ran the update from the OCSinventory website.
It's running on Ubuntu 20.04LTS
The User is an interesting idea, the software installed under /opt/OCSREPORT is a mess, I'll need to sort that out, it is part owned by my own username, part by root, which does not look good.  What do you mean the "user and group from Debian?"
thanks for your help
Duncan
closed with the note: Sorted, error message itself was wrong!
in OCS Inventory NG server for Unix by (270 points)
closed by

4 Answers

0 votes
 
Best answer

The error message is wrong. I fixed the issue like this:

chmod 755 /usr/share/ocsinventory-reports/ocsreports/logs/

(/var/lib/ocsinventory/reports/logs is not being used).
by (4.6k points)
selected by
0 votes
selinux is off and you use the user and group from debian ?

I don't know how you made your installation but there is something not correct in your question. So try to begin with all needed informations :
Linux distribution ?
how do you have install OCS ?

Another thing : never put 777 on a directory (or maybe you really don't care about security).
by (22k points)
0 votes
Sorry, I should add that it doesn't matter what I set the LOGS_DIR to in the configuration, it's always reporting back that it's not writable.  I've tried setting it to be /tmp, /var/www/html, and a dedicated, always writable directory.
by (270 points)
0 votes
That's marvellous, thank you pchamorro, sorted now.
by (270 points)
 
Powered by Question2Answer
...