Fix permissions and syncing