Zentyal Forum, Linux Small Business Server

Zentyal Server => Other modules => Topic started by: theb2b on April 30, 2018, 07:18:33 pm

Title: [Solved]Log Error - Write to logs "Operation not permitted"
Post by: theb2b on April 30, 2018, 07:18:33 pm
Getting following message when attempting to open the webadmin interface after login.

Cannot write to '/var/log/zentyal/zentyal.log': Operation not permitted at /usr/share/perl5/Log/Log4perl/Appender/File.pm line 245

Initially found I had run out of space on the / drive, but have resolved that problem but I'm still getting the above message. Restarted, from the cli, DHCP\DNS they are now working, tried to restart logs, did not resolve the problem. What caused me to run out of space on the root drive was ips module and logs it was filling. as an example the stat.log was well over 10 gig and there where others in the same directory. I have stopped the ips service\module for now and rm the stat.log until I can get above resolved ips will remain stopped. From what I can tell the permissions for the log in question same as all other logs in that directory -rw-r--r--.

Title: Re: Log Error - Write to logs "Operation not permitted"
Post by: julio on May 02, 2018, 05:32:44 pm
Getting following message when attempting to open the webadmin interface after login.

Cannot write to '/var/log/zentyal/zentyal.log': Operation not permitted at /usr/share/perl5/Log/Log4perl/Appender/File.pm line 245

Initially found I had run out of space on the / drive, but have resolved that problem but I'm still getting the above message. Restarted, from the cli, DHCP\DNS they are now working, tried to restart logs, did not resolve the problem. What caused me to run out of space on the root drive was ips module and logs it was filling. as an example the stat.log was well over 10 gig and there where others in the same directory. I have stopped the ips service\module for now and rm the stat.log until I can get above resolved ips will remain stopped. From what I can tell the permissions for the log in question same as all other logs in that directory -rw-r--r--.


you can/need optimize the ips loging interval:
stop the ips service:
zentyal 4.x:
Code: [Select]
sudo service zentyal ips stopzentyal 5.x:
Code: [Select]
sudo zs ips stop
truncate the ips log:
Code: [Select]
sudo truncate -s0 /var/log/suricata/stats.log
create custom ips stub:
Code: [Select]
sudo mkdir /etc/zentyal/stubs/ips
sudo cp /usr/share/zentyal/stubs/ips/suricata-debian.yaml.mas /etc/zentyal/stubs/ips/suricata-debian.yaml.mas
sudo nano /etc/zentyal/stubs/ips/suricata-debian.yaml.mas

under category "stats:"
you will find the line "interval: 8" (8sec)
change to "interval: 60" (60sec)
save and exit: ctrl-o enter, ctrl-x enter

start the ips service:
zentyal 4.x:
Code: [Select]
sudo service zentyal ips startzentyal 5.x:
Code: [Select]
sudo zs ips start
Title: Re: Log Error - Write to logs "Operation not permitted"
Post by: theb2b on May 03, 2018, 03:42:52 am
Resolved issue with ips logging but still getting the "Operation not permitted error. Thoughts on how to address that?
Title: Re: Log Error - Write to logs "Operation not permitted"
Post by: theb2b on May 03, 2018, 03:58:25 am
Never mind julio, rebooted the server and all is good now. Thanks!
Title: Re: [Solved]Log Error - Write to logs "Operation not permitted"
Post by: marcosm on August 26, 2019, 03:30:12 pm
Hi, I had the same problem in zentyal 6.0. Restarting uwsgi service I could login to the web admin again

Code: [Select]
systemctl restart zentyal.webadmin-uwsgi.service