determine action to take based on file permissions