<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Le 23/12/2020 à 18:40, Jean-Yves
      Baudais a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:117148253.31869.1608745239769.JavaMail.zimbra@insa-rennes.fr">
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">I will try to test by forcing File permissions on my system, and see
what copyfile() does.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">

I tested for different combinaison of permissions ('w', 'r', 'x'): copyfile() keeps them unchanged. (Permissions are kept for 'user' only, I guess permission mask or something like that for 'group' and 'other'.)</pre>
    </blockquote>
    <p><br>
    </p>
    <p>copyfile has no option to force permissions of the copy.<br>
      You might do and test the following:</p>
    <ol>
      <li>replace the copyfile instruction with a mgetl + mputl
        combination:<span
          style="color:rgb(100,174,100);font-style:italic;"><br>
          // r = copyfile(File, File2);</span><span
          style="color:rgb(0,0,0);"><br>
          r</span> <span style="color:rgb(92,92,92);">=</span> <span
          style="color:rgb(50,185,185);">mgetl</span><span
          style="color:rgb(74,85,219);">(</span><span
          style="color:rgb(0,0,0);">File</span><span
          style="color:rgb(74,85,219);">)</span><span
          style="color:rgb(0,0,0);">;</span><span
          style="color:rgb(50,185,185);"><br>
          mputl</span><span style="color:rgb(74,85,219);">(</span><span
          style="color:rgb(0,0,0);">r</span><span
          style="color:rgb(0,0,0);">,</span> <span
          style="color:rgb(0,0,0);">File2</span><span
          style="color:rgb(74,85,219);">)</span><span
          style="color:rgb(0,0,0);">;<br>
          <br>
        </span></li>
      <li><span style="color:rgb(0,0,0);">exec demo_gui.sci to update it<br>
          <br>
        </span></li>
      <li><span style="color:rgb(0,0,0);">Remove </span><span
          style="color:rgb(0,0,0);">demo_gui_dockable</span><span
          style="color:rgb(92,92,92);">.</span>xml in TMPDIR, or just
        exit and run a new session (so with a new TMPDIR)<br>
        <br>
        <span style="color:rgb(0,0,0);"></span></li>
      <li><span style="color:rgb(0,0,0);">run demo_gui(), and play with
          its dockable preferences.</span></li>
    </ol>
    <p><br>
    </p>
    <p>If it works, i will push a patch for Scilab 6.1.1. Anyway the
      copyfile issue would have to be addressed. Since copyfile() is
      used 18 times within Scilab, other issues elsewhere could be
      expected. At least, the fact that permissions are kept should be
      documented in the copyfile help page.</p>
    <p><br>
    </p>
  </body>
</html>