update file and directory ownership and permissions