Skip to content

Instantly share code, notes, and snippets.

@jmahmood
Created April 27, 2012 04:23
Show Gist options
  • Save jmahmood/2505741 to your computer and use it in GitHub Desktop.
Save jmahmood/2505741 to your computer and use it in GitHub Desktop.
Python chgrp Function
import os
def chgrp(filepath, gid):
uid = os.stat(filepath).st_uid
os.chown(filepath, uid, gid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment