update file type and file permission