View the original community article here
Last tested: Dec 1, 2020
When you see the error Net::SFTP::StatusException (3, "permission denied") when setting up a sftp schedule it's usually caused by one of four things:
- A missing trailing slash at the end of the sftp connect url. This URL, for instance will not work:
sftp://sftp.dev.looker.com/home/testaccount
It will error with permission denied because sftp is trying to open a directory for writing. Adding a trailing slash opens a file for writing iside the target directory, which is what we want. So you should write:
sftp://sftp.dev.looker.com/home/testaccount/
- The sftp user does not have write permissions to the destination directory. Test by creating a small text file in your local directory. Use command line sftp to connect to the destination server, e.g.
sftp sftpuser@sftp.host.url
. Once logged in tryput filename
. Typels
to verify that the file was transferred. If this errors or does not results in a file on the destination the sftp user doesn't have write permission. - The destination directory does not exist. If the absolute path points to a directory that doesn't exist or isn't the true working directory for that user you will receive a permission denied error.
- Per this documentation page, looker's IPs should be allow-listed for Looker hosted instances.
- The user hasn't specified the path to where they want the file to go, correctly.
- SFTP into your server.
sftp sftpuser@sftp.host.url
- Fo to the directory of where you want to drop your files, and do
pwd
. - Make sure this file path, ex,
/Home/test_folder/
is the exact path you're using in your schedule modal file path.
- SFTP into your server.
This content is subject to limited support.