Loading ...
Sorry, an error occurred while loading the content.

File Permissions on created png files doesn't use umask

Expand Messages
  • Shadowe Darkfyre
    Maybe I m doing something wrong here, but I can t figure out how to set the file permissions on the png files created via ploticus. I need to create group
    Message 1 of 2 , Jun 25, 2010
    • 0 Attachment
      Maybe I'm doing something wrong here, but I can't figure out how to set the file permissions on the png files created via ploticus.

      I need to create group writeable png files, but ploticus doesn't appear to use my umask.

      Here is a test that I just ran to illustrate this:

      > cat test.pl
      #!/dashboard/bin/perl10

      `/dashboard/bin/pl /etrade/home/dashboard/test.pol -o /etrade/home/dashboard/test.png -png`;

      > rm test.png
      rm: cannot lstat `test.png': No such file or directory
      > ./test.pl
      > ls -altr test.png
      -rw-r--r-- 1 dashboard etrade 1089 Jun 25 08:25 test.png
      > umask
      000
      > rm test.png
      > touch test.png
      > ls -altr test.png
      -rw-rw-rw- 1 dashboard etrade 0 Jun 25 08:26 test.png
    • Steve Grubb
      Hi, the file protection mode for png output files is hard-coded. There was a reason for doing this, but I currently don t remember what it was. if you have
      Message 2 of 2 , Jun 28, 2010
      • 0 Attachment
        Hi,

        the file protection mode for png output files is hard-coded.  There was a reason for doing this, but I currently don't remember what it was.

        if you have access to the source code you can change this behavior by editing grgd.c , search on chmod, and comment out that line of code, and then do a make clean; make

        otherwise you;d need to somehow do a chmod on the file after it is generated.

        Steve


        On Fri, Jun 25, 2010 at 11:34 AM, Shadowe Darkfyre <scottiecochran@...> wrote:
         

        Maybe I'm doing something wrong here, but I can't figure out how to set the file permissions on the png files created via ploticus.

        I need to create group writeable png files, but ploticus doesn't appear to use my umask.

        Here is a test that I just ran to illustrate this:

        > cat test.pl
        #!/dashboard/bin/perl10

        `/dashboard/bin/pl /etrade/home/dashboard/test.pol -o /etrade/home/dashboard/test.png -png`;

        > rm test.png
        rm: cannot lstat `test.png': No such file or directory
        > ./test.pl
        > ls -altr test.png
        -rw-r--r-- 1 dashboard etrade 1089 Jun 25 08:25 test.png
        > umask
        000
        > rm test.png
        > touch test.png
        > ls -altr test.png
        -rw-rw-rw- 1 dashboard etrade 0 Jun 25 08:26 test.png


      Your message has been successfully submitted and would be delivered to recipients shortly.