Differences

This shows you the differences between the selected revisions of the page.

faq_su 2024-03-07 faq_su 2026-05-07 (current)
Line 10: Line 10:
In some cases (with Unix/Linux server) you may be able to use ''[[&man_ref(8,sudo)|sudo]]'' command straight after login to change a user, before file transfer session starts. In some cases (with Unix/Linux server) you may be able to use ''[[&man_ref(8,sudo)|sudo]]'' command straight after login to change a user, before file transfer session starts.
-[[ftp|FTP]] protocol does not allow this..+[[ftp|FTP]] protocol does not allow this.
The [[scp|SFTP]] and [[scp|SCP]] protocols allow for this, but the actual method is platform dependent. The [[scp|SFTP]] and [[scp|SCP]] protocols allow for this, but the actual method is platform dependent.
Line 16: Line 16:
  * With SFTP protocol, you can use //[[ui_login_sftp#protocol_options|SFTP server]]// option on //SFTP page// of Advanced Site Settings dialog to execute SFTP binary under a different user. With OpenSSH server, you can specify: \\ <code>   * With SFTP protocol, you can use //[[ui_login_sftp#protocol_options|SFTP server]]// option on //SFTP page// of Advanced Site Settings dialog to execute SFTP binary under a different user. With OpenSSH server, you can specify: \\ <code>
sudo /bin/sftp-server sudo /bin/sftp-server
-</code> Note that SFTP server binary may be located elsewhere((You can see path to SFTP binary in ''Subsystem sftp'' clause in ''/etc/ssh/sshd_config'', unless keyword ''internal-sftp'' is used instead of a path.)) (e.g. in ''/usr/lib/sftp-server'', ''/usr/lib/openssh/sftp-server'' or ''/usr/libexec/openssh/sftp-server'').+</code> Note that SFTP server binary may be located elsewhere((You can see path to SFTP binary in ''Subsystem sftp'' clause in ''/etc/ssh/sshd_config'', unless keyword ''internal-sftp'' is used instead of a path. You may also use ''whereis sftp-server'' command to locate the binary.)) (e.g. in ''/usr/lib/sftp-server'', ''/usr/lib/openssh/sftp-server'' or ''/usr/libexec/openssh/sftp-server'').
  * With SCP protocol, you can specify the following command as custom shell on the //[[ui_login_scp#shell|SCP/Shell page]]// of Advanced Site Settings dialog: \\ <code>   * With SCP protocol, you can specify the following command as custom shell on the //[[ui_login_scp#shell|SCP/Shell page]]// of Advanced Site Settings dialog: \\ <code>
Line 32: Line 32:
  yourusername ALL=NOPASSWD: /bin/sftp-server   yourusername ALL=NOPASSWD: /bin/sftp-server
-Note that as WinSCP cannot implement terminal emulation, you need to have ''sudoers'' option ''requiretty'' turned off (which is default).+Note that as WinSCP cannot implement terminal emulation, you need to have ''sudoers'' option ''requiretty'' turned off (which is the default and even not supported by modern ''sudo-rs'' implementation). 

Last modified: by 124.29.249.85