Project

General

Profile

Actions

Bug #15194

open

PHP Fatal error in easyrule CLI

Added by David Johnston 3 months ago. Updated 3 months ago.

Status:
Incomplete
Priority:
Low
Assignee:
-
Category:
PHP Interpreter
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
2.7.2
Affected Architecture:

Description

Running "easyrule block wan 1.0.152.114" via ssh caused an error.
It looks like it's a problem in backup_config().
It's actually a permissions error; easyrule needs to be run as root.

Possible fixes:
1. chmod 700 /usr/local/bin/easyrule
2. Add a check to the PHP to report permissions errors.


Files

PHP_errors.log (2.3 KB) PHP_errors.log Crash report data David Johnston, 01/26/2024 02:22 PM
Actions #1

Updated by Marcos M 3 months ago

  • Category changed from Unknown to PHP Interpreter
  • Status changed from New to Incomplete

I was not able to reproduce this. The error points to an issue writing the backup cache:

    $bakout = fopen(g_get('cf_conf_path') . '/backup/backup.cache', "w");
    fwrite($bakout, serialize($backupcache));
    fclose($bakout);

This could mean there's some issue related to the filesystem (e.g. full disk).

Actions #2

Updated by David Johnston 3 months ago

To clarify, I ran easyrule as a regular user, and the account didn't have permissions to write to the backup cache.

Actions #3

Updated by Kris Phillips 3 months ago

David Johnston wrote in #note-2:

To clarify, I ran easyrule as a regular user, and the account didn't have permissions to write to the backup cache.

David,

So, to clarify, if you test this with the local admin user its' fine but if you try this with any other user it is not? Were the users that you're testing with a part of the admins group?

Actions

Also available in: Atom PDF