Duplicating failing when using sudo on login

Advertisement

immewnity
immewnity avatar
Joined:
Posts:
3
Location:
Chicago, IL

Duplicating failing when using sudo on login

I've got an SFTP site set up as per the "Use sudo on Login" section of https://winscp.net/eng/docs/faq_su:
  • SFTP->SFTP server is set to sudo /usr/lib/openssh/sftp-server
  • myusername ALL=NOPASSWD: /usr/lib/openssh/sftp-server is set in sudoers
  • Additionally, authentication is via password-protected SSH key.
This works perfectly fine for most file operations; I can edit/delete/move files without issue. However, when I try and duplicate files (https://winscp.net/eng/docs/ui_duplicate), I get an error with exit status 1:
Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
Duplicating via local temporary copy works fine.

Am I missing something, or is this expected?

Reply with quote

Advertisement

immewnity
immewnity avatar
Joined:
Posts:
3
Location:
Chicago, IL

The SFTP server does appear to support direct duplication, though:

sftp> ls *.txt
test.txt
sftp> cp test.txt test2.txt
sftp> ls
test.txt    test2.txt

(running OpenSSH_10.0p2 Debian-7+deb13u4 for context)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
43,017
Location:
Prague, Czechia

Re: Duplicating failing when using sudo on login

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum