Nov-03-2016, 02:10 PM
(Nov-03-2016, 10:02 AM)digitalquake Wrote: Thanks for the hints :)
I think the umask is there because this script write to an active folder shared over network and the scripts has to be run under root or an admin that can write folders with 777 permission in order to make them accessible to different users of the network.
If you use the mode explicitly and never change the umask this is pointless. What you can do is change the umask once for all at the beginning to 0000 so that it doesn't restrict the rights on the files and directories you create (0666 for files and 0777 for directories). Which means your code could be a lot simpler.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net