cd_func: change file access