Multi user setup / umask

A group of researchers would like to use cryoSPARC on our universities HPC cluster.
I’ve successfully installed cryoSPARC onto our CentOS 7 based HPC cluster with SGE / Gridengine scheduler.

According to the documentation I’ve created a new user and group “cryosparc” for it.
I’ve added the user accounts of the researchers into the cryosparc group, this way they can chgrp / chmod their files so cryoSPARC can read them. This works fine.
However the output files/folders which cryoSPARC produce are not group writable, only group readable. (umask 022, chmod 644 / 755)
So the researchers won’t be able to modify or delete any of the output files produced by cryoSPARC.
The default umask on our system is 002, so it seems like cryoSPARC intentionally changes it to 022.

Is it possible to change the default umask in cryoSPARC? Or make cryoSPARC not change the umask?
Another (ugly) possibility would be to give the research group access to the cryosparc user via sudo.

Other suggestions for properly implementing this kind of setup are welcome too.

And because I couldn’t find a proper SGE example, here are my working cluster_info.json and
(setup is not in production yet so not 100% tested)


    "name" : "sgecluster",
    "worker_bin_path" : "/software/cryosparc/cryosparc/cryosparc2_worker/bin/cryosparcw",
    "cache_path" : "/usertmp/cryosparc",
    "send_cmd_tpl" : "{{ command }}",
    "qsub_cmd_tpl" : "qsub -terse {{ script_path_abs }}",
    "qstat_cmd_tpl" : "qstat -j {{ cluster_job_id }}",
    "qdel_cmd_tpl" : "qdel {{ cluster_job_id }}",
    "qinfo_cmd_tpl" : "qstat"

#!/usr/bin/env bash

#$ -N cryosparc_{{ project_uid }}_{{ job_uid }}
#$ -q gpu
#$ -pe smp {{ num_cpu }}
#$ -l ngpus={{ num_gpu }}
#$ -l h_vmem={{ ram_gb }}G
#$ -V
#$ -cwd
#$ -o {{ job_dir_abs }}
#$ -e {{ job_dir_abs }}

{{ run_cmd }}

Hi @davidb,

Thanks for reporting this- this is something we didn’t realize was happening; there aren’t any explicit calls to the umask function to change it, so I’m not sure why it is even being modified. Do you think you can try modifying your to have umask 002 right at the top after the shebang line? Let me know if this works.

I have a similar problem, but for a single workstation. Users want to be able to manipulate files in the project directory. I’ve changed the umask in the .bashrc of the cryosparc_user to 000 and if I run touch test, the file gets the expected permission (rw-rw-rw-). I restarted using cryosparcm restart, but then new job directories gets rwxr-xr-x and files gets rw-r–r--.

Ok, if someone else run into this problem, here is an ugly workaround. I’ve setup a cron job to update the file permission every 10 minutes in the project directory of the user.

> crontab -l
*/10 * * * * chmod go+w -R /home/my_user_name/cryosparc_projects/*

Hi @daniel.s.d.larsson,

Thanks for reporting. Can you try the following fix?
Edit the file cryosparc2_master/supervisord.conf:

In the [supervisord] section add umask = 002 on the line after childlogdir=%(ENV_CRYOSPARC_ROOT_DIR)s/run/

Save the file, then restart cryoSPARC:
cryosparcm stop
cryosparcm start

Please let me know if this works!

Hi @daniel.s.d.larsson, @davidb,

The default umask for cryoSPARC is now 002, as of cryoSPARC v3.0, available now!