allow setting of permissions (experimental, doesnt work most of the time)