Skip to content

"FileListing" can not handle "T" permission #4447

@wushiqinlou

Description

@wushiqinlou

"file_permissions" encounters "ValueError" when trying to parse the following ls output:

d-w----r-T   2 root   root         6 Jul 24  2022 spooler
drwxrwxrwt     7 0 0  2397 Mar 18 22:39 keyframes

It seems that the function expects "rwxsS" on the "T" location.

Updating the pattern as the following can avoid this issue:

        (.)([-rwxsStT]{3})([-rwxsStT]{3})([-rwxsStT]{3})   # -rwxrwxrwx

https://github.com/RedHatInsights/insights-core/blob/master/insights/util/file_permissions.py

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