Skip to content

Pyzor crashes with PermissionError on Fedora 43 #181

@vmario89

Description

@vmario89

Hi,

since OS upgrade my pyzor instance always crashes when getting called by amavis. I got into the backtrace by "abrt-cli" tool and it says

pyzor:101:load_configuration:PermissionError: [Errno 1] Operation not permitted
Traceback (most recent call last):
  File "/usr/local/sbin/pyzor", line 436, in <module>
    main()
~^^
  File "/usr/local/sbin/pyzor", line 135, in main
    config, options, args = load_configuration()
                            ~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/sbin/pyzor", line 101, in load_configuration
    os.nice(options.nice)
    ~~~~~~~^^^^^^^^^^^^^^
PermissionError: [Errno 1] Operation not permitted
Local variables in innermost frame:
userhome: '/var/spool/amavisd'
homedir: '/var/spool/amavisd/.pyzor'
defaults: {'ServersFile': 'servers', 'AccountsFile': 'accounts', 'LocalWhitelist': 'whitelist', 'LogFile': '', 'Timeout': '5', 'Style': 'msg', 'ReportThreshold': '0', 'WhitelistThreshold': '0'}
description: "Read data from stdin and execute the requested command (one of 'check', 'report', 'ping', 'pong', 'digest', 'predigest', 'genkey', 'local_whitelist', 'local_unwhitelist')."
opt: <optparse.OptionParser object at 0x7f880041e510>
options: <Values at 0x7f880041e900: {'nice': 0, 'debug': False, 'homedir': '/var/spool/amavisd/.pyzor', 'Style': None, 'LogFile': None, 'ServersFile': None, 'AccountsFile': None, 'LocalWhitelist': None, 'Timeout': None, 'ReportThreshold': None, 'WhitelistThreshold': None, 'version': False}>
args: ['check']

so the catch statement does not except PermissionError here.

sadly i have no idea how to fix this. The avamis user is able to run /usr/local/sbin/pyzor check with any trouble (checked this manually). There is also exactly zero error line in the SELinux log file

the user of /var/spool/amavisd/.pyzor is avamis and this looks good

my fix for now is to disable the lines around os.nice(options.nice) but i prefer a real fix and to understand the root cause.

any idea?

thanks, Mario

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions