Fix Chmod option

fix write to folder issue