Fix permission denied when rotating log file