當我打電話make_path
(從核心File::Path
模塊,提供一個模式,創建的目錄沒有我要求的模式:make_path不設置模式
$ perl -MFile::Path=make_path -e 'make_path("foobar", { mode=>0770 });'
$ ls -ld foobar/
drwxr-x--- 2 itk itkadm 4096 Sep 19 11:10 foobar/
我期待看到:
drwxrwx--- 2 itk itkadm 4096 Sep 19 11:07 foobar/
只要使用chmod,如果這就是你想要的。 – 2017-11-17 06:20:22