I am currently writing a file managing system in python, now I want to know how can I change the rights for access to a file or folder in a most basic way. I'm programming on a RPi3.
I am familiar with linux and python, but I want a "solution closer to the basis of linux". I know well that I could do it by running a shell command with subprocess or so. I want some deep experience with file rights and such stuff.
I still have problems with the real basic understanding of the rwx
-stuff. Are there a couple of bits that are set to the corresponding values in the actual file or are the right saved somwhere on the drive inbetween the files in a folder? Are the informations stored in the folder containing the file? I really can't imagine how to access this information and/or change it.
My final questions are:
How does the right system work in the deepest level?
Is there some part in the
os
-libary or some other library to manage this task?
I special I'd appreciate a solution for RPi3 but any solutio for linux would be handy as well.
Thanks in advance!