make permission check part of inititialize_filesystem