A fix to premission denied problem