Python

Python : File permission manipulation

Classification

Overview

The application changes the file access permissions. The extra permissions (e.g., the right to execute) for an unlimited number of users can facilitate the organization of the attack.

Rootwrap provides a mechanism by which you can execute commands with elevated privileges (typically as root). Special care must be taken to ensure that this use of code does not allow a less privileged user to run commands as root.

Rootwrap provides a series of filters to limit the use of commands. The most commonly used filter is CommandFilter, but it provides the least restrictions on the command call.

POSIX based operating systems utilize a permissions model to protect access to parts of the file system. This model supports three roles “owner”, “group” and “others” each role may have a combination of “read”, “write” or “execute” flags sets.

Python provides chmod to manipulate POSIX style permissions. You need to report an error when chmod grants too many rights to someone.

CRITICAL

DerScanner Severity Score

Check your Python code for this vulnerability, free

Request a free pilot of DerScanner. We give you access and help with the first scan. It works in the cloud and on-premise.

Try it on your code, free

By submitting this form, I acknowledge that DerScanner may process my personal data I provided above for purposes explained above. More details about the processing.