fix file access privilege and subsite publication detection