[Python] How to Write to Root-Owned Files from a Python Script?

Discussão em 'Python' iniciado por Stack, Abril 7, 2025.

  1. Stack

    Stack Membro Participativo

    Is there any way for other users to write to root-owned files like those in procfs, sysfs, or devfs? The file permissions are set to 644, so I can read them, but I can't write to them.

    I'm curious if it's possible to do this with a python script. The script is automatically run by the system, so I can't manually execute it with sudo or anything like that. I’m guessing this might not even be possible because of security restrictions, though.

    Thanks!

    Continue reading...

Compartilhe esta Página