http://www.perlmonks.org?node_id=967556

Hena has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I have a question with regards to File::Path module. I wanted to do a directory path with 2750 or rwxr-s--- permissions. However instead of getting that, I got something completely different. Here's an example

perl -e 'BEGIN{use File::Path qw(make_path)} make_path("foo/bar", { mode => 2750 })'

Result of that is following:
d-w-rwxrwT+

This when converted to numerical mode with stat -c '%a %n' foo is 1274.

This seems like a bug in the module. And so is there a way to create a path like this without resorting to mkdir -pm2750 foo/bar and chgrp?