I'm using a program named ajenti on linux. it's a program to manage linux servers and it's written in python.
I need to get linux username of logged in user for different sections like file manager. it is required to restrict user's access.
the source of that software can be found here, and for example in line 73 of file manager the access can be defined. however I'm getting username by functions like "os.path.expanduser" or "pwd.getpwuid(os.getuid()).pw_name" now, it only returns "root" regardless of the logged in user.
I want each username, what should I do?
P.S: This is not a duplicate. I know there has been questions like mine but that's not exactly what I want. there is a slight difference between them.