fixing permissions and trying to limit root usage