Re: Commands for changing ownership of a file

2011-08-14 Thread Michael Poeltl
in python-3.2.1 I'm using os.system() again, from time to time maybe that's the one you were looking for? >>> os.system('chown user:group /tmp/f') 0 >>> os.system('ls -l /tmp/f') -rw-r--r-- 1 user group 0 Aug 15 03:52 /tmp/f and besides os.chown() (where you ned the uid and gid), you could also u

Re: Commands for changing ownership of a file

2011-08-14 Thread Chris Rebert
On Sun, Aug 14, 2011 at 3:56 PM, Jason Hsu wrote: > 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?

Commands for changing ownership of a file

2011-08-14 Thread Jason Hsu
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