WinSCP and sudo /bin/bash1

Advertisement

WebDev
Guest

WinSCP and sudo /bin/bash1

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:
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

Reply with quote

Advertisement

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.

Reply with quote

robs
Guest

@webdev: can you explain better this
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

To make some operation I must use sudo

If I write sudo su I can access as root
[m:c2249224a2]root@host-ubuntu:~#
[/m:c2249224a2]
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?

Reply with quote

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 not work;

Reply with quote

Advertisement

You can post new topics in this forum