Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    SFTP Access denied

    N8N
    sftp
    3
    6
    212
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      manngobaum last edited by girish

      Hi,

      I want to build an automation with n8n to transfer a file from Google Drive to Paperless via SFTP. I am able to connect to the SFTP via the FTP Node in n8n but when I try to execute the transfer I am receiving the following failure:

      ERROR: put: Permission denied /consume/
      

      n8n.png
      I am able to connect via FileZilla and also upload a file in the directory. What can I do?

      Best,
      Sven

      micmc girish 2 Replies Last reply Reply Quote 0
      • micmc
        micmc @manngobaum last edited by

        @manngobaum Hello, is the directory you want to add, created and writable?


        https://marketingtechnology.agency
        For cutting edge web technologies

        M 1 Reply Last reply Reply Quote 0
        • M
          manngobaum @micmc last edited by

          @micmc Yes, it‘s the one Cloudron creates. It‘s available in FileZilla and the Web UI of Cloudron.

          1 Reply Last reply Reply Quote 0
          • girish
            girish Staff @manngobaum last edited by girish

            @manngobaum To double check the username/password and connectivity, you can open the Web Terminal of the n8n app and try this:

            root@fbbe56ac-d7f8-4fd7-a899-74c1463d6022:/app/code# sftp -P 222 girish@wp.cloudron.space@wp.cloudron.space 
            ...
            Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
            ...
            girish@wp.cloudron.space@wp.cloudron.space's password: 
            Connected to wp.cloudron.space.
            sftp> 
            

            The first girish@wp.cloudron.space is the SFTP username and the second @wp.cloudron.space is the app. In your case, these would be the paperless app domain.

            M 1 Reply Last reply Reply Quote 0
            • M
              manngobaum @girish last edited by

              @girish Thanks for your answer. I tried it and I can connect. I ran the list command in the n8n UI with the following result:
              Bildschirmfoto 2022-05-28 um 11.02.51.png

              trying the Upload command I receive the failure:Bildschirmfoto 2022-05-28 um 11.04.03.png

              Error: put: Permission denied /consume
                  at fmtError (/app/code/node_modules/ssh2-sftp-client/src/utils.js:55:18)
                  at WriteStream.<anonymous> (/app/code/node_modules/ssh2-sftp-client/src/index.js:733:18)
                  at Object.onceWrapper (node:events:642:26)
                  at WriteStream.emit (node:events:527:28)
                  at Object.cb (/app/code/node_modules/ssh2/lib/protocol/SFTP.js:3715:12)
                  at 101 (/app/code/node_modules/ssh2/lib/protocol/SFTP.js:2708:11)
                  at SFTP.push (/app/code/node_modules/ssh2/lib/protocol/SFTP.js:278:11)
                  at CHANNEL_DATA (/app/code/node_modules/ssh2/lib/client.js:525:23)
                  at 94 (/app/code/node_modules/ssh2/lib/protocol/handlers.misc.js:859:16)
                  at Protocol.onPayload (/app/code/node_modules/ssh2/lib/protocol/Protocol.js:2025:10)
                  at GenericDecipherBinding.decrypt (/app/code/node_modules/ssh2/lib/protocol/crypto.js:1418:26)
                  at Protocol.parsePacket [as _parse] (/app/code/node_modules/ssh2/lib/protocol/Protocol.js:1994:25)
                  at Protocol.parse (/app/code/node_modules/ssh2/lib/protocol/Protocol.js:293:16)
                  at Socket.<anonymous> (/app/code/node_modules/ssh2/lib/client.js:713:21)
                  at Socket.emit (node:events:527:28)
                  at addChunk (node:internal/streams/readable:315:12)
              
              M 1 Reply Last reply Reply Quote 0
              • M
                manngobaum @manngobaum last edited by

                The solution is to add the filename to the path:

                In my case:

                /consume/file.pdf
                
                1 Reply Last reply Reply Quote 3
                • First post
                  Last post
                Powered by NodeBB