chmod If you don't want to rely on umask, you can always change permissions manually: # set permissions to rw- r-- --- chmod 0640, "newfile" or die; # set permissions to rwx r-x --- chmod 0750, "thedir" or die;