gdshare.py for file permission control