I'm using python 2.6.4 on Solaris 5-10.

I have a file named "myFile". It is owned by someone else, by I ("myuser") am 
in the file's group ("mygrp"). Below is my python code. Why does it tell me 
that mygrp has no members???


>>> import os, pwd, grp
>>> stat_info = os.stat("myFile")
>>> fileUID = stat_info.st_uid
>>> fileGID = stat_info.st_gid
>>> fileGroup = grp.getgrgid(fileGID)[0]
>>> fileUser = pwd.getpwuid(fileUID)[0]
>>> print "grp.getgrgid(fileGID) = %s" % grp.getgrgid(fileGID)

grp.getgrgid(fileGID) = grp.struct_group(gr_name='mygrp', gr_passwd='', 
gr_gid=100, gr_mem=[])
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to