When trying to create an SFTP share on openSUSE I got the following error:
[Errno 2] No such file or directory: '/lib64/libpopt.so.0'
Traceback (most recent call last):
File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 41, in _handle_exception
yield
File "/opt/rockstor/src/rockstor/storageadmin/views/sftp.py", line 80, in post
rsync_for_sftp(chroot_loc)
File "/opt/rockstor/src/rockstor/system/ssh.py", line 127, in rsync_for_sftp
('%s/lib64' % chroot_loc))
File "/usr/lib64/python2.7/shutil.py", line 133, in copy
copyfile(src, dst)
File "/usr/lib64/python2.7/shutil.py", line 96, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/lib64/libpopt.so.0'
zypper says libpopt0 is already installed. I can find it at /usr/lib64/libpopt.so.0, so the code is possibly looking for it in the wrong place?
Let us know if you make an progress in tracking this down any further.
Iβd look to this bit first:
I.e. chroot_loc may be set wrong. Havenβt been there for ages. If you take a look at a few recent [openSUSE] related commits you can see how we do stuff contextually using distro. That may be all we need here. But again, I havenβt looked into this yet but if you fancy doing so then great.
Thanks again for a nice report and do post here any progress. Once we have the root cause you could create a GitHub issue to get this one sorted if you fancy:
Thanks again for the report and if you do get to creating a GitHub issue for this, once itβs clarified a tad, remember to link back to this forum post.
@freaktechnik, @phillxnet, I was waiting for a computation to run so I had a few minutes to kill.
I thus looked and indeed, we are looking in the wrong place, it seems as we have the libs location hardcoded (for centOS, I assume) here:
As per @freaktechnik findings, it seems like we should use /usr/lib64 instead of /lib64/ in line 126 (assuming all the other libs have the same location as well in openSUSE.
I can pop this in the beta release notes. Always good to have additional confirmation, just in case the developer and reviewer missed the same thing/things: @Flox and me respectively in this case.
Thanks for actively helping with Rockstorβs development by the way. Iβm quite looking forward to having this whole CentOS to βBuilt on openSUSEβ move over and done with and we are very nearly there now.