SFTP Not Working

Just installed this on a Dell 420 with 4 x 8TB Drives.

So, trying to test SFTP transfer from cPanel’s WHM backup manager area, getting this error despite proper SFTP port 22, username, password and passive mode enabled. Correct IP address too.

Error: Validation for transport “Rockstor” failed: Could not upload test file: Couldn’t open remote file ‘/validate.tmp-7757-1492640956.txt’: Permission denied

and

Error: Validation for transport “Rockstor” failed: The Net::SFTP::Foreign object failed to instantiate: bad remote message received

How do I correct that?

Also, under “Disks” I see this:

S.M.A.R.T support is not available for this disk (scsi-36c81f660e4820300205de144056cf6e8-part4).
Please see the S.M.A.R.T column entry for this disk on the Storage - Disks page; custom options may be required.

Also, under File Sharing > SFTP

Houston, we’ve had a problem.
Share(home) is owned by root. It cannot be exported via SFTP with root ownership

        Traceback (most recent call last):

File “/opt/rockstor/eggs/gunicorn-0.16.1-py2.7.egg/gunicorn/workers/sync.py”, line 34, in run
client, addr = self.socket.accept()
File “/usr/lib64/python2.7/socket.py”, line 202, in accept
sock, addr = self._sock.accept()
error: [Errno 11] Resource temporarily unavailable

I tried using an ftp software as well (FireFTP) connecting with SFTP, port 22 and the user/pw I created before. I get this error.

Connected (version 2.0, client OpenSSH_6.6.1)
Authentication (password) successful!
Secsh channel 1 opened.
Error message= uncaught exception: EOFError: "undefined"
URL=
Line Number= 0

Rockstor Logs:

[19/Apr/2017 17:42:38] ERROR [storageadmin.views.disk:303] Error running a command. cmd = /usr/sbin/smartctl --info /dev/disk/by-id/usb-Lexar_JumpDrive_09020000001395835297-0:0. rc = 1. stdout = ['smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.8.7-1.el7.elrepo.x86_64] (local build)', 'Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org', '', '/dev/disk/by-id/usb-Lexar_JumpDrive_09020000001395835297-0:0: Unknown USB bridge [0x05dc:0xa203 (0xa00)]', 'Please specify device type with the -d option.', '', 'Use smartctl -h to get a usage summary', '', '']. stderr = ['']
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/storageadmin/views/disk.py", line 301, in _update_disk_state
    do.name, do.smart_options)
  File "/opt/rockstor/src/rockstor/system/smart.py", line 316, in available
    [SMART, '--info'] + get_dev_options(device, custom_options))
  File "/opt/rockstor/src/rockstor/system/osi.py", line 110, in run_command
    raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = /usr/sbin/smartctl --info /dev/disk/by-id/usb-Lexar_JumpDrive_09020000001395835297-0:0. rc = 1. stdout = ['smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.8.7-1.el7.elrepo.x86_64] (local build)', 'Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org', '', '/dev/disk/by-id/usb-Lexar_JumpDrive_09020000001395835297-0:0: Unknown USB bridge [0x05dc:0xa203 (0xa00)]', 'Please specify device type with the -d option.', '', 'Use smartctl -h to get a usage summary', '', '']. stderr = ['']

@Bashed Welcome to the Rockstor community.

You appear to have 3 issues here so I’ll attempt to address each in turn.

Have a look at my answer to a recent “Resource temporarily unavailable” + SFTP question which hopefully will address this:

So in short Rockstor’s SFTP implimentation uses openssh’s built in capabilities and with this we have some constraints over share ownership and SFTP share exporting. Hopefully the Secure File Transport Protocol (SFTP) section of our docs should help. Ie check that you are conforming with the required share ownership detailed in that doc.

This is simply a notification that this scsi mapping has not been found to support S.M.A.R.T. correctly or at least that is Rockstor’s assessment so it can’t display any S.M.A.R.T. info as it might usually.

Your test with a different sftp client shares the permission requirement at Rockstor’s end is my suspicion.

And lastly we have:

Is just a log of the smartctl --info attempt on your Lexar JumpDrive, which if it returns a non zero is used as a ‘test’ to see if smart is at all available; the result then informs the UI of smart availability. However note that the message indicates that you may be able to use a custom smart option of -d, I’d try “-d sat” as a first bet as that may help to at least silence those log entries; and if you are lucky my may get some smart data out of that JumpDrive. Available options and more informed suggestions are linked to from the custom smart config page within Rockstor.

Adding Custom Smart options is documented in the following docs section:
S.M.A.R.T
Linked to from our Disks section

http://rockstor.com/docs/smart/smart.html

where the example used indicates a similar “Unknown USB bridge …” type entry in the logs.

Hope that helps.