fixed a bug affecting setting file  mode to public when folder is changed to public