Commands for changing ownership of a file

Jason Hsu jhsu802701 at gmail.com
Mon Aug 15 00:56:58 CEST 2011


I have a script that I execute as root, but I need to change the
ownership of the files created in the script to that of my username.
In GNU Bash, the command is something like "chown myusername:users".
What's the equivalent Python command?  I know that there is a command
that uses numbers for the username and group, but is there a command
that would allow me to use "myusername" and "users" instead of numbers?



More information about the Python-list mailing list