Author Topic: [Solved]Log Error - Write to logs "Operation not permitted"  (Read 1448 times)

theb2b

  • Zen Monk
  • **
  • Posts: 55
  • Karma: +2/-0
    • View Profile
[Solved]Log Error - Write to logs "Operation not permitted"
« 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--.

« Last Edit: May 03, 2018, 04:24:14 am by theb2b »

julio

  • Guest
Re: Log Error - Write to logs "Operation not permitted"
« Reply #1 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

theb2b

  • Zen Monk
  • **
  • Posts: 55
  • Karma: +2/-0
    • View Profile
Re: Log Error - Write to logs "Operation not permitted"
« Reply #2 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?

theb2b

  • Zen Monk
  • **
  • Posts: 55
  • Karma: +2/-0
    • View Profile
Re: Log Error - Write to logs "Operation not permitted"
« Reply #3 on: May 03, 2018, 03:58:25 am »
Never mind julio, rebooted the server and all is good now. Thanks!

marcosm

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: [Solved]Log Error - Write to logs "Operation not permitted"
« Reply #4 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