lee-houghton / dusterjs

Node script to watch & compile directory of dust.js templates
4 stars 4 forks source link

Missing output directories are created with mode 0000 causing subsequent EACCES failures #2

Open AlainODea opened 9 years ago

AlainODea commented 9 years ago

When running duster on Ubuntu the directories it creates for missing output directories are created with mode 0000. This disallows the creation of files within those folders and duster itself starts emitting errors like the following:

Error: profile/profile-details.dust: Error: EACCES, permission denied 'dust/profile/profile-details.js'

The implementation within cli.js hands in null for the mode parameter. This appears to be interpreted as fallback to umask when creating the directory. Unfortunately the umask is 0002 which is insufficient.

I tried to fix this by explicitly handing in mode 0777 instead of null and it did not work. The directories still appear with mode *0000_. This may be a bug in _node-fs**, but I can't see it even on close inspection.