Getting rsync error when attemping to debug code on device

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for providing all the relevant details and screenshots.

The rsync exit code 23, along with Permission denied errors when writing to the target directory inside your Torizon device, is usually related to file system write-protection or user permission issues on Torizon OS.

Key Points for Torizon OS

  • Torizon OS mounts the root filesystem as read-only; only a few directories like /etc and /var are writable for security reasons.
  • Code and development artifacts should be copied to writable directories such as /home/torizon.

Reference:
Torizon OS Architecture - Read-only rootfs

Diagnosing Your Error

From your rsync command:

rsync -P -av ... /home/SAbrahamian/snmptoserial/src torizon@10.85.76.237:/home/torizon/snmptoserial/

You’re targeting /home/torizon/snmptoserial/, which should be writable. However, you’re experiencing:

mkstemp "/home/torizon/snmptoserial/src/.main.py.XXXXXX" failed: Permission denied (13)

This indicates either:

  • The parent directory exists but does not have write permission for torizon user, or
  • The root filesystem is misconfigured and denying access.

Solutions

1. Check Directory Ownership on Target Board

SSH into your board and run:

ls -ld /home/torizon/snmptoserial /home/torizon/snmptoserial/src
  • If /home/torizon/snmptoserial or its src subdirectory exists and isn’t owned by user torizon, fix the permissions:
sudo chown -R torizon:torizon /home/torizon/snmptoserial
  • If they don’t exist, your rsync command should create them (unless the parent folder has restricted permissions).

2. Remove and Let VS Code Recreate

If src/ exists but permissions aren’t right, simply remove the whole /home/torizon/snmptoserial folder and retry debugging in VS Code:

rm -rf /home/torizon/snmptoserial

Let the VS Code extension create it afresh via its rsync process.

3. Ensure Containerized Workflow

If you are not using the Torizon IDE Extension’s workflow (containerized deployment), follow the steps to set up your project properly:

4. WSL and Docker Context Check

Verify in VS Code:

  • Docker context is set to the correct engine (should be on WSL2 if your environment is Linux containers).
  • The Torizon IDE extension’s settings point to the right target.

See:
VS Code & WSL2 Docker Guidance


Summary of actions:

  • Ensure /home/torizon/snmptoserial/ is owned by torizon.
  • Remove and let the IDE extension recreate the folder if permissions are incorrect.
  • Use the recommended project structure.
  • Double-check WSL2 and Docker context settings in VS Code.

If you provide the output of ls -ld as mentioned or run into further issues, I can help analyze and advise next steps.

Best regards,
Toradex AI Assistant.

References: