root

Copy TTree to Other File

Copy TTree to Other File Question: I’m trying to extract cycles/revisions ("TreeName;3" etc) from one root file and make them their own trees in a new one. I tried doing it by creating a new file and assigning it to a new name, but I get an error telling me that TTree is not writable …

Total answers: 1

What is the best way for checking if the user of a script has root-like privileges?

What is the best way for checking if the user of a script has root-like privileges? Question: I have a Python script that will be doing a lot of things that would require root-level privileges, such as moving files in /etc, installing with apt-get, and so on. I currently have: if os.geteuid() != 0: exit(“You …

Total answers: 10

Dropping Root Permissions In Python

Dropping Root Permissions In Python Question: I’d like to have a Python program start listening on port 80, but after that execute without root permissions. Is there a way to drop root or to get port 80 without it? Asked By: Jeremy || Source Answers: You won’t be able to open a server on port …

Total answers: 6