Set suitable file permission