[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] output files and umask



On 2/2/2017 2:01 PM, Michael Di Domenico wrote:
what controls the umask of the Output files from a submit script?

when users submit jobs to the pool like this

executable = myexec
log = mylog.txt
output = output.$(process).txt

the file permissions for the output file seem to be set to 0644,
however the users umask is set for 0027, so the files should be 0640

is there a knob to fix this?  Ideally i'd like the Output files to
match the umask of the user, but if it can't discern that, i'd like to
default to 0640 instead of 0644

we're already wrapping the jobs in a USER_JOB_WRAPPER script which
sets the umask to 0027 and double checks it's set before we exec the
process.  which fixes some other issues we had with jobs creating
files with the wrong perms, but that doesn't seem to be affecting
these Output files

I am working from memory here, but I think by default the stdout and stderr for your job will be created by condor_submit. This explains why your USER_JOB_WRAPPER script setting umask won't help with stdout and stderr. However, if the umask is 0640 in the environment running condor_submit (is it? or perhaps these jobs are submitted by dagman?), I'd expect the permissions to be correct.

Perhaps one quick workaround that would be easy to try is to just tell condor_submit to not create the stdout/err files, and let the job do that on its own. That way the umask setting in your USER_JOB_WRAPPER should do the trick. To do this, you can put in your job submit file
  skip_file_checks = True
or if you want to change the default behavior for condor_submit, you could put in your condor_config file:
   SUBMIT_SKIP_FILECHECKS = True

Personally, I'd like to see the default for SUBMIT_SKIP_FILECHECKS to switch from False to True in future HTCondor releases... anyone object?

regards,
Todd