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


in reply to Re^4: File permissions problem (updated)
in thread File permissions problem

Hi Wayne,

So what's the result of running those commands to check on your umask setting? Update: Oh, I misunderstood your post because of the formatting! (missing <code> tags; I just considered the node for editing)

Taking a look a the function SaveUTF from the source that you also posted in your other reply, it appears the module is saving files by using File::Temp to create a new file, and then replacing the old file with an unlink and a rename. File::Temp apparently sets the files it creates to mode 0600. I don't see an option to change that, so it'd probably be necessary to chmod the files after creation. You could simply set it to an explicit mode like 0640, or you could use the current umask like so: chmod(0666&~umask,$filename);

Regards,
-- Hauke D