Added ability to change permissions.