Unable to delete P12: ServerError: validation error: lock file for P12 not found

Whenever I try to perform any opration to workspace or project or job, I get error mentioning cs.lock file could not be found. But I still see there is cs.lock file present in the directory. Is there any solution to fix this issue?

“Unable to delete P12: ServerError: validation error: lock file for P12 not found at /media/ashwin/data/cryoEM_data/40_300_data/10457/CS-empiar-10457/cs.lock”


Please can you post the outputs of these commands:

stat /media/ashwin/data/cryoEM_data/40_300_data/10457/CS-empiar-10457/cs.lock
stat -f /media/ashwin/data/cryoEM_data/40_300_data/10457/CS-empiar-10457/cs.lock

Here is the screenshot of the stat cs.lock file

and here is the screenshot of stat -f cs.lock:

The error message may be misleading. I suspect the underlying problem is that the lock file is owned by the root user. Do you know why that might be, even though CryoSPARC should be installed and run under a non-privileged Linux account?

Hi wtempel,
I had a user cryosparc account from a shared node. After the root user updated cryosparc to V4.0.3. I also faced the same problem. I cannot delete or create any project, jobs. Do you think if the root user did a chmod order to open all his files will fix the problem? Thank you so much.


@Feng Welcome to the forum.
CryoSPARC should neither be installed, managed nor run by the root user, but under a non-privileged Linux account. Managing or running a CryoSPARC instance under the root account poses a security risk and is likely to corrupt file ownerships such that the CryoSPARC instance will cease to function.
I would recommend a dedicated, non-privileged cryosparcuser (or similarly named) Linux account when a CryoSPARC instance is shared by several persons (see guide). If the CryoSPARC instance is not shared between persons, the instance could also be installed, managed and run in a personal, non-root Linux account.

Hi wtempel,

Maybe I discrible it wrong. I should have a worker account. Previously my CRYOSPARC wroks normally, while after the master account updated the cryosparc to V4.0.3, I can log in but I cannot operate my cryosparc. When I want to delete the job or project, it shows that the same issue with Ashwin-Dhakal. I want to know how to fix it?



The fix depends on the specific state of the project directory and how the project directory ended up in this state.

Are you that root user or was the update performed by someone else?

It was updated by other user. I only have a user account, so I can log in, but I cannot operate now. If I want to delete previously project, it will show “lock file not found”. I cannot create a new project either.

You may want to get in touch with that other user and, with reference to the guide, together decide on and implement a file ownership/permission strategy that works under your circumstances.


I have run into the same problem but I did not update using sudo.

Running cryosparcm cli “take_over_project()” comes back with “none”

Is there a fix for this or do I have to reinstall?

Any guidance would be appreciated,

Did you specify the project_uid parameter for the function? If you did, please re-run the command and post the complete output of the command as well as the output of
cryosparcm log command_core

I realized that others in the lab were writing project files to a different directory so when I run the above command it is not searching the correct area. Is there a way to point it to the other directory?
We have projects on an external for space vs main disk. For example - cryosparc is install in /home/cryosparc whereas these project directoeies are in /media/mjmcleod/sata_ssd/cryosparc/P11/

(base) mjmcleod@thornextalcomp:~$ cryosparcm cli “take_over_project(P11)”
Traceback (most recent call last):
File “/home/mjmcleod/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/home/mjmcleod/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/home/mjmcleod/cryosparc/cryosparc_master/cryosparc_compute/client.py”, line 57, in
File “”, line 1, in
NameError: name ‘P11’ is not defined

The project UID needs to be single-quoted like
cryosparcm cli "take_over_project('P11')"
It seems that a conda environment, “base”, is active in your shell. I am unsure if/how this active conda environment might interact with CryoSPARC commands that may run in their own (transparently activated) conda environment. You may want to consider to
conda deactivate
before running cryosparcm commands. If the “base” environment is activated automatically, but you do not need it active all the time, you may disable automatic activation as described elsewhere.