Writing file using Execute Command

Describe the issue/error/question

I’m trying to run youtube-dl on modified n8n docker file, but when I tested it it says permission denied. I guess it’s expected because when I tried using touch command, it’s also return the same thing.

Is there any way to achieve this?

What is the error message (if any)?

ERROR: Command failed: youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=code ERROR: unable to open for writing: [Errno 13] Permission denied: 'video-title.webm.part'

Please share the workflow

Share the output returned by the last node

NodeOperationError: Command failed: youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=code
ERROR: unable to open for writing: [Errno 13] Permission denied: 'video-title.webm.part'

    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ExecuteCommand/ExecuteCommand.node.js:76:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:590:53

Information on your n8n setup

  • **n8n version:0.218.0
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]:Docker

Hey @ampersanda,

Welcome to the community :tada:

Have you added a volume to your container for writing files to? Step 5 on this page: Docker Compose - n8n Documentation has a part that talks about adding a volume for writing files to.

The quick version is you would need to use a directory that can be written to so in your command you would have to specify an output folder or cd into a different directory.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.