second try: fix for postgres issue and permissions #938