Topic "WinSCP and sudo /bin/bash1"

Author Message
WebDev

Guest


I have been using WinSCP to connect, upload, and edit files to a secure Redhat Linux server for some time now. Recently it stopped working for some reason--I am able to connect, but I cannot upload or edit files like I used to. I think this is a 'sudo' issue as I am getting the "error 3: permission denied". I am able to "sudo /bin/bash1" to root using Putty. The only special setting I have (that worked before) is SCP/Shell>Shell: sudo bash1. I have also tried "sudo /bin/bash1" to no avail. Any ideas?

Log:
Code:
Bypass authentication: No
Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
SSH Bugs: -,-,-,-,-,-,-,-,-
SFTP Bugs: -,-
Return code variable: Autodetect; Lookup user groups: Yes
Shell: sudo bash1
EOL: 0, UTF: 2
Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
Local directory: C:\Users\webdev\Desktop, Remote directory: /var/www/html, Update: No, Cache: Yes
Cache directory changes: Yes, Permanent: Yes
DST mode: 1
--------------------------------------------------------------------------
Looking up host "xxxxxxxxxxxxxxx"
Connecting to xxxxxxxxxxxxxx port 922
Server version: SSH-2.0-OpenSSH_4.3
Using SSH protocol version 2
We claim version: SSH-2.0-WinSCP_release_4.3.7
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "webdev".
Prompt (7, SSH password, , &Password: )
Sent password
Access granted
Opened channel for session
Started a shell/command
--------------------------------------------------------------------------
Using SFTP protocol.
Doing startup conversation with host.
Type: SSH_FXP_INIT, Size: 5, Number: -1
Type: SSH_FXP_VERSION, Size: 5, Number: -1
SFTP version 3 negotiated.
We believe the server has signed timestamps bug
We will use UTF-8 strings for status messages only
Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
Changing directory to "/var/www/html".
Getting real path for '/var/www/html'
Type: SSH_FXP_REALPATH, Size: 22, Number: 16
Type: SSH_FXP_NAME, Size: 47, Number: 16
Real path is '/var/www/html'
Trying to open directory "/var/www/html".
Type: SSH_FXP_LSTAT, Size: 22, Number: 263
Type: SSH_FXP_ATTRS, Size: 37, Number: 263
Getting current directory name.
Listing directory "/var/www/html".
Type: SSH_FXP_OPENDIR, Size: 22, Number: 523
Type: SSH_FXP_HANDLE, Size: 13, Number: 523
Type: SSH_FXP_READDIR, Size: 13, Number: 780
Type: SSH_FXP_NAME, Size: 4871, Number: 780
Type: SSH_FXP_READDIR, Size: 13, Number: 1036
Type: SSH_FXP_STATUS, Size: 28, Number: 1036
Status code: 1
Type: SSH_FXP_CLOSE, Size: 13, Number: 1284
Startup conversation with host finished.
Copying 1 files/directories to remote directory "/var/www/html/"
  PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: Yes (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: Yes; Mask: *.*
  TM: M; ClAr: No; CPS: 0; ExclM(No):
  AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
File: "C:\Users\webdev\Desktop\test.php"
Copying "C:\Users\webdev\Desktop\test.php" to remote directory started.
Ascii transfer mode selected.
Opening remote file.
Type: SSH_FXP_OPEN, Size: 47, Number: 1539
Type: SSH_FXP_STATUS, Size: 24, Number: 1284
Discarding reserved response
Type: SSH_FXP_STATUS, Size: 34, Number: 1539
Status code: 3, Message: 1539, Server: Permission denied, Language: 
Type: SSH_FXP_LSTAT, Size: 31, Number: 1799
Type: SSH_FXP_STATUS, Size: 29, Number: 1799
Status code: 2, Message: 1799, Server: No such file, Language: 
(ETerminal) Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 3
Asking user:
Cannot create remote file '/var/www/html/test.php'. ("Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 3")
(EScpSkipFile) Cannot create remote file '/var/www/html/test.php'.
Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 3
Listing directory "/var/www/html".
Type: SSH_FXP_OPENDIR, Size: 22, Number: 2059
Type: SSH_FXP_HANDLE, Size: 13, Number: 2059
Type: SSH_FXP_READDIR, Size: 13, Number: 2316
Type: SSH_FXP_NAME, Size: 4871, Number: 2316
Type: SSH_FXP_READDIR, Size: 13, Number: 2572
Type: SSH_FXP_STATUS, Size: 28, Number: 2572
Status code: 1
Type: SSH_FXP_CLOSE, Size: 13, Number: 2820
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Shell is not used with SFTP. For SFTP you need to set SFTP server:
https://winscp.net/eng/docs/ui_login_sftp

See also https://winscp.net/eng/docs/faq_su
WebDev

Guest


What's odd is that it used to work--using shell sudo bash1. But I got it to work without setting anything under SFTP or Shell. The admins created a group with access and put my username in it instead. This way, I don't need to be root.
robs

Guest


@webdev

can you explain better this
Quote:

The admins created a group with access and put my username in it instead. This way, I don't need to be root.


I insert myusername inner the group root but not work;
example I am user robs, when I does login have this
by putty:
robs@host:
and am here (command pwd)
/home/rob

for make some operation I must uso sudo

if I write 'sudo su' I can access how root
root@host-ubuntu:~#
and am here
/root

how you suggest I insert (me) user robs inner the group root
"adduser robs root"

but with winscp have always the same error of Permission

can you write steps steps how to solve?
sudo
robs

Guest


solution is to assign at root one pw and after login how root;
I not know if so there are some problems in the use ogf ubuntu;

I also tested options in the winscp where is possible to set the protocol sudo su .. but nt work;
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License