[Errno 26] Text file busy: u'/mnt3/peter/bin/bash'

[Please complete the below template with details of the problem reported on your Web-UI. Be as detailed as possible. Community members, including developers, shall try and help. Thanks for your time in reporting this issue! We recommend purchasing commercial support for expedited support directly from the developers.]

Brief description of the problem

Error when adding sftp service to share

Detailed step by step instructions to reproduce the problem

I’m having problem connecting using sftp. Afp works fine. Suspected it was a problem with the user account so I disabled sftp and created a new user peter2, reenabled sftp and was attempting to reconnect the “test” share to sftp:

Logged in as peter2
Opened "File sharing>SFTP
Clicked add new
Selected share
Error popup appeared as below:

  Rockstor 3.8-14
  Linux: 4.6.0-1.el7.elrepo.x86_64

Web-UI screenshot

[Drag and drop the image here]

Error Traceback provided on the Web-UI

            Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
File “/opt/rockstor/src/rockstor/storageadmin/views/sftp.py”, line 79, in post
File “/opt/rockstor/src/rockstor/system/ssh.py”, line 121, in rsync_for_sftp
shutil.copy(’/bin/bash’, (’%s/bin’ % chroot_loc))
File “/usr/lib64/python2.7/shutil.py”, line 119, in copy
copyfile(src, dst)
File “/usr/lib64/python2.7/shutil.py”, line 83, in copyfile
with open(dst, ‘wb’) as fdst:
IOError: [Errno 26] Text file busy: u’/mnt3/peter/bin/bash’

OK; I was logged in as peter in a terminal window. Logged out and now everything seems to work as expected. Bit strange though.

@peter Thanks for the update and glad you got it working. There are some peculiarities to how we implement sftp access as we use the module that comes with the default openssh server and that brings some restrictions. Please see the Secure File Transport Protocol (SFTP) section of the official docs which should explain what these restrictions are.