<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>How do you 'manually create a directory'? That would be when the
      ownership of root would be occurring. After creating it, you can
      chown/chmod it as well.</p>
    <p>Brian Andrus<br>
    </p>
    <div class="moz-cite-prefix">On 11/18/2023 7:35 AM, Arsene Marian
      Alain wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:DB4PR03MB86093EC755468B526E5F9971F5B6A@DB4PR03MB8609.eurprd03.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator"
        content="Microsoft Word 15 (filtered medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}span.EstiloCorreo17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Dear slurm community,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I run slurm 21.08.1 under Rocky Linux 8.5
          on my small HPC cluster and am trying to configure
          job_container/tmpfs to manage the temporary directories.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have a shared nfs drive "/home" and a
          local "/scratch" (with permissions 1777) on each node.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">For each submitted job I manually create a
          directory with the "JOB_ID.$USER" in the local "/scratch"
          which is where all the temp files for the job will be
          generated. Now, I would like to do these automatically
          (especially to remove the directory when the job finishes or
          is canceled):<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I added the following parameters in my
          /etc/slurm.conf:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">JobContainerType=job_container/tmpfs<o:p></o:p></p>
        <p class="MsoNormal">PrologFlags=contain<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">So, I have created the "job_container.conf"
          in the directory "/etc/slurm"<o:p></o:p></p>
        <p class="MsoNormal">with the following configuration:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">AutoBasePath=false<o:p></o:p></p>
        <p class="MsoNormal">BasePath=/scratch<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Then, I replicated the changes to all nodes
          and restarted the slurm daemons.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Finally, when I launch the job a directory
          with the "JOB_ID" is created in the local "/scratch" of the
          compute node. The only problem is that the owner of the
          directory is "root" and the user who submitted the job doesn’t
          have read and write permissions to that directory (other users
          do not either).<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I would like that:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">1) The name of the automatically created
          directory will be: "JOB_ID.$USER"<o:p></o:p></p>
        <p class="MsoNormal">2) The owner of the directory will be the
          user who submitted the job, not "root".<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Please, could someone help me?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thanks a lot.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Best regards,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Alain<o:p></o:p></p>
      </div>
    </blockquote>
  </body>
</html>