SFTP_PERMISSION_DENIED” on File Upload From NetSuite to SFTP Servers via SuiteScript

User tries to upload Files from NetSuite to their SFTP server using the connection.upload(options) method within the sftp Module in SuiteScript 2.0 but encounters the error above. Whenever the user tries to connect to the SFTP or Download from the server, the script does not return an error. When checking the role permissions, the role has full access to upload within the SFTP server directory.

Solution

he failure is not due to insufficient permission but the name of the file. To resolve the error:

Check the file name of the File being uploaded within the connection.upload() method
Make sure that the file name doesn’t have illegal characters
Example:

\ / : * ? ” < > |

Leave a comment

Your email address will not be published. Required fields are marked *