Issues for error: <class 'PermissionError'>, [Errno 13]

I installed CryoSPARC, but when I run cryosparcm status, I encounter the following error. I have changed the directory permissions to allow all users to access, write, and read, but for some reason, this error still occurs. I can launch CryoSPARC and access the software interface.

If you know any solution to this problem, please let me know.

error: <class 'PermissionError'>, [Errno 13] Permission denied: file: /home/xxxxx/cryosparc_dir/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/supervisor/xmlrpc.py line: 557

Welcome to the forum @yuipik .
Please can you post the output of the following commands, run on the CryoSPARC master computer:

whoami
cd /home/xxxxx/cryosparc_dir/cryosparc_master/
ls -l bin/cryosparcm
ls -l /tmp/cryosparc*sock

thank you for your reply, @wtempel

the output result is here,

whoami
username
ls -l bin/cryosparcm
-rwxrwxrwx 1 username root 77519 Jun 5 05:19 bin/cryosparcm
ls -l /tmp/cryosparc*sock
srwx------ 1 root root 0 Jul 12 14:46 /tmp/cryosparc-supervisor-587e9b7c1997915e7bc7087c19b7247c.sock

should i change the permission under the /tmp ?

The file ownership suggests that CryoSPARC may have been started by the root user, which is strongly discouraged.
CryoSPARC should be installed, maintained and run by a designated, non-privileged Linux user account.
Recovery of the CryoSPARC instance may be complex and is not guaranteed to work. You can try:

  1. a complete, confirmed CryoSPARC shutdown. Keep in mind that under the circumstances you described, processes that need to be terminated may be owned by various Linux users, including root.

  2. After confirmation that no more CryoSPARC processes are running, identify files and directories that are not owned by the designated, non-privileged Linux user that should run CryoSPARC and change their ownership to that non-privileged account. Files and directories with incorrect ownership may be found inside

    • cryosparc_master/
    • cryosparc_worker/
    • the CryoSPARC database directory (defined by the CRYOSPARC_DB_PATH variable inside cryosparc_master/config.sh)
    • CryoSPARC project directories

    with a command like

    find interestingdirectory/ ! -user correctuser -ls
    
  3. Disable non-owner write permissions on files inside CryoSPARC software and database directories.

  4. Disable configurations that may enable running CryoSPARC commands by the incorrect user, such as CRYOSPARC_FORCE_USER.

  5. Try starting CryoSPARC.

  6. Ensure that cryosparcm commands are run by the designated, non-privileged Linux account.

I tried to stop cryosparc but I could not stop it because of error below,

cryosparcm stop

CryoSPARC is running.

Stopping cryoSPARC

error: <class ‘PermissionError’>, [Errno 13] Permission denied: file: /home/username/cryosparc_dir/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/supervisor/xmlrpc.py line: 557

is there way to stop the cryosparc forcibly?

You may want to consider identifying and terminating relevant processes with caution (details).