SFTP and SMB can only access first time

Bug #1596648 reported by Bill
110
This bug affects 23 people
Affects Status Importance Assigned to Milestone
Files
Fix Released
High
Jeremy Wootten

Bug Description

Used smb:// to access network folder, worked the first time, then unable to mount.
Same issue occured with sftp:// site.

Probably not related: Said I hadn't chosen a default file manager.

ProblemType: Bug
DistroRelease: elementary 0.4
Package: elementary-desktop 1.412+467~daily~ubuntu0.4.1 [origin: LP-PPA-elementary-os-daily]
ProcVersionSignature: Ubuntu 4.4.0-24.43-generic 4.4.10
Uname: Linux 4.4.0-24-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CrashDB: elementary_meta
CurrentDesktop: Pantheon
Date: Mon Jun 27 14:00:59 2016
InstallationDate: Installed on 2016-06-27 (0 days ago)
InstallationMedia: elementary OS 0.4 "Loki" - Daily amd64 (20160613)
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: elementary-meta
SuspiciousXErrors:

ThirdParty: True
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Bill (webguymi) wrote :
Revision history for this message
Bill (webguymi) wrote :

Regarding the note about Default File manager, the only software added was Geany.

Zisu Andrei (matzipan)
summary: - LOKI File Manager SFTP and SMB 2nd Time Access
+ SFTP and SMB can only access first time
affects: elementaryos → pantheon-files
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

So, you typed "smb//" into the pathbar and pressed enter? What did you do between the first and second times?

I notice that the loading times out if the password dialog is not completed promptly, which is a bug. However this is easily fixed by pressing the reload button once log in is completed.

Changed in pantheon-files:
status: New → Incomplete
Revision history for this message
Bill (webguymi) wrote :

As an added piece of information, it appears that the smb issue is specific to my 'homedir', which is a redirect for my corporate network roaming driving.

The message was 'Unable to mount folder'

Revision history for this message
Bill (webguymi) wrote :

I have since reinstalled, and since that, the smb issue has disappeared. I have been unable to connect to my sftp connections at all, receiving only the message 'unable to mount folder', using my own and root ssh keys.

Revision history for this message
Bill (webguymi) wrote :

Given that, it may be appropriate to reject this report, and I could refile for the sftp later, after checking with my admin to see what his logs are reporting about what attempts at authentication are being made.

I'm assuming the 'unable to mount folders' in the case of sftp is referring to the gvfs folder?

Revision history for this message
Bill (webguymi) wrote :

Another 'possibly related': I can access my external sftp addresses which have non-standard ports, if I specifically enter the port (meaning it's not reading my .ssh config??).

Revision history for this message
Zisu Andrei (matzipan) wrote :

Hello,

Yes, please file another report for the SFTP issue. I can confirm it, as I've seen it happen intermittently.

Revision history for this message
shantanu saha (shantanucse18-gmail) wrote :

I am affected by this bug too. When I choose connect to network from left bar, it open a connection dialog, after giving the credentials it open a new tab with sftp url but shows "Unable to mount, could not connect to the server for this folder".

But if I open nautilus after that, I can directly access the sftp link(without any password). That's means sftp was established earlier by Pantheon-files.

Additional info:
Files version: 0.2.4
Kernel version: 4.4.0-31-generic
pantheon-files 0.2.4

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Have you tried pressing the "Reload" icon after you get the "Unable to mount" screen? There is a bug concerning the directory initialization timing out too soon which might be related to this.

Revision history for this message
Zisu Andrei (matzipan) wrote :

I cannot confirm the "reload" icon has any effect.

Revision history for this message
Zisu Andrei (matzipan) wrote :

The message I see on the command line is:

[WARNING 10:06:28.680974] gof-directory-async.vala:329: Error connecting to connectable sftp://pi@10.42.0.235/home/pi - Could not connect to 10.42.0.235: Connection refused
[WARNING 10:06:28.681016] gof-directory-async.vala:186: Failed to get file info for file sftp://pi@10.42.0.235/home/pi
[WARNING 10:06:28.681042] gof-directory-async.vala:343: sftp://pi@10.42.0.235/home/pi cannot load. Connected false, Mounted true, Exists true

Revision history for this message
Zisu Andrei (matzipan) wrote :

Marking this as new since there are plenty of reports of this issue. One of them relates to mounting and Android device as USB as well.

Changed in pantheon-files:
status: Incomplete → New
status: New → Confirmed
Revision history for this message
Bill (webguymi) wrote :

Reload made no difference.

Revision history for this message
shantanu saha (shantanucse18-gmail) wrote :

Nope, reload or F5 didn't help in my case. I have attached a screenshot. And yes, according @Ziku Andrei, Files doesn't mount in MTP too.

https://s6.postimg.org/mbhkut4td/Screenshot_from_2016_08_17_02_20_31.png

Revision history for this message
Max (max-bordelon) wrote :

Same "Connect to server" sftp "unable to mount folder" bug on fresh install of loki
(elementaryos-0.4-stable-amd64.20160909.iso)
Files 0.3.0.2
Standard sftp port. Using uname/password. Server on same subnet.
Can sftp to server from terminal without issue

Tried the F5 reload with no effect.

Revision history for this message
Max (max-bordelon) wrote :

Adding to the above comment, also note that the gvfs sftp resource IS connecting and mounting in the Files app correctly under '/run/user/1000/gvfs/stfp:host=xxxx,user=yyyy/'. The Files app can also unmount the resource. It appears that just the right side display pane is not traversing to the correct file path associated with the sftp mount after the mount occurs and displays the "Unable to Mount Folder" message in the pane.

After Files app mounted, I tried to traverse the mounted sftp resource in terminal and had no issues.

I assumed that all of the integrated apps shipping with Loki use the same underlying file dialog picker code. So I started up Scratch. In Scratch, the mapped resource is not displayed in the left panel (e.g., it should say "username at servername" under the Network label). However, I am able to traverse by directly entering the path into the search/path ribbon at the top. The display behavior is not consistent though.

I've uploaded a window screen shot compilation. The first row is showing the Files app. I've drilled down to "/run/user/1000/gvfs" and you can see the folder icon for "sftp:host=imac,user=max". When I click on this, the ribbon changes to "SFTP > max@imac" and the pane shows "Unable to Mount Folder." Note however the left display panel is showing a current connection for "max on imac" with the little "eject" icon to unmount.

In the next row of the uploaded screenshot, I was in Scratch and also traversed down to "/run/user/1000/gvfs". When I click on the "sftp:host=imac,user=max" folder I am able to drill down successfully into the folder with the display sorting folders and filenames intermixed. This dialog is shown on row 2 pic 2 of the attachment. What is a little strange is that if I click on anything in the folder/file pane, the ribbon will change from "max on imac" to "SFTP > max@imac" and it resorts with all folders listed before filenames. Also note in the Scratch "folder dialog" the connection to "max on imac" is not shown in the left pane. If I click on "+ Other Locations" it does not show up either.

Until this bug is resolved I've installed Nemo and I find it works correctly as expected.

Hope this provides more detail into the issue.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Thanks for your detailed investigation Max.

The FileChooser used for Pantheon apps is essentially the Gtk.FileChooser one except that the navigation bar at the top has been replaced by the Files one, which is why the Sidebar and View look and behave different to Files.

I am not having this problem with the basic server I have set up for testing. One difference I notice is that I address the server directly with its IP address (on the local network). Is the server you are using on the local network and could you try typing in the IP address rather than the name to see whether it makes any difference?

Changed in pantheon-files:
importance: Undecided → High
Revision history for this message
Max (max-bordelon) wrote :

I get the same behavior whether addressing directly with the full IP address (192.168.101.6), or using the server name. I have the IP address of the server named on my router's DHCP service, so I can access either way. Just easier to type "iMac" rather than the whole IP every time.

The elementary box and server are on the same subnet (e.g., 192.168.101.xxx)

Also, was initially logging in via uname/password, but have since installed RSA keys to do away with the necessity of a password. Behavior however is the same regarding the Files folder/file pane regardless of method of logging into the resource to mount.

Again, it appears everything is actually working regarding the actual mount/unmount process. It just that Files isn't loading in the target folder for display. And of course, something funky is happening in the ribbon in respect to the code displaying a "friendly" folder location versus the actual "/run/user/1000/gvfs/..."

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

If anyone experiencing this bug is able to build and test the linked branch and report I would be grateful. Running pantheon-files --debug in the terminal should give more information

Revision history for this message
Bill (webguymi) wrote :

I got bazaar setup, but I don't know what to do with the branch...

Revision history for this message
Zisu Andrei (matzipan) wrote :

Hello Bill,

You need to get a copy of the code using the bzr branch command. (you can find the right command on the second line of this [1] page).

You then need to install the build dependencies with: sudo apt-get build-dep pantheon-files

And then you use the instructions on line 25 in this [2] file to build Files

[1] https://code.launchpad.net/pantheon-files
[2] http://bazaar.launchpad.net/~elementary-apps/pantheon-files/trunk/view/head:/INSTALL#L25

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Thanks Bill, for having a go at building the testing branch - as I have not yet been able to reproduce these problems on my system it is invaluable for others to help. Please remember to kill any running Files processes in the background before running the test branch otherwise the existing version will run instead. If you run the test branch in a terminal you will see that it just ends if another Files is running.

Revision history for this message
Fabrice Desré (0-fabrice-f) wrote :

I did a local build but it fails to run:

[INFO 22:40:41.081306] Application.vala:155: Files version: 0.3.0.2
[INFO 22:40:41.081354] Application.vala:157: Kernel version: 4.4.0-38-generic
[INFO 22:40:41.128896] Application.vala:83: Report any issues/bugs you might find to http://bugs.launchpad.net/pantheon-files
[WARNING 22:40:41.156080] PluginManager.vala:128: Failed to load module from path '/usr/local/lib/pantheon-files/plugins/core/libpantheon-filestrash.so': /usr/local/lib/pantheon-files/plugins/core/libpantheon-filestrash.so: undefined symbol: pf_file_utils_restore_files_from_trash
/usr/local/bin/pantheon-files: symbol lookup error: /usr/local/bin/pantheon-files: undefined symbol: gof_abstract_slot_initialize_directory

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Fabrice: Looks like your installed version is incompatible with the more recent trunk that my branch is based on with respect to the plugins, in which case it will only run if you do a "sudo make install" I am afraid. If you run it locally it still uses the installed plugin modules unfortunately.

Revision history for this message
Bill (webguymi) wrote :

It seemed to build without errors, as far as I can tell - I'm not sure how to run the local ... or if it actually worked at all...

I apologize for my ignorance on the whole build thing.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

@Bill: Unless you are running the development branch of Elementary (using the daily repository : deb http://ppa.launchpad.net/elementary-os/daily/ubuntu/ xenial main) you will need to install the testing branch in order to replace the plugin modules. Otherwise, like Fabrice, the testing branch may not run locally. So while in your build directory in a terminal, after building, type "sudo make install". After that you can run the testing branch locally in the terminal, while in the build directory and after stopping any Files processes that might be running in the background, by typing "./src/pantheon-files --debug" and it will output various messages while it tries to connect to your server.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

If anyone is willing and able to install and test the linked branch (remembering to kill any existing pantheon-files and pantheon-files-daemon processes) and report back that would be very helpful as it is not possible to reproduce everyone's network setup. Please run in terminal with the --debug flag to get additional debugging info.

Changed in pantheon-files:
status: Confirmed → In Progress
assignee: nobody → Jeremy Wootten (jeremywootten)
milestone: none → juno-beta1
Revision history for this message
Bill (webguymi) wrote :

I was willing to test, but I was unable to install successfully.

Revision history for this message
Devinda (dsenanayaka1) wrote :

I ran it as instructed above, but there was no change. Here is the log :

[WARNING 12:03:30.208948] gof-directory-async.vala:337: Error connecting to connectable sftp://dcsbc8@131.151.243.81/ - Could not connect to 131.151.243.81: No route to host
[WARNING 12:03:30.208973] gof-directory-async.vala:186: Failed to get file info for file sftp://dcsbc8@131.151.243.81/
[WARNING 12:03:30.208991] gof-directory-async.vala:351: sftp://dcsbc8@131.151.243.81/ cannot load. Connected false, Mounted true, Exists true

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Devinda: Thanks for trying but you should have got more messages if you were running the linked branch with the --debug flag. You need to compile the branch (see HACKING file) and then, in the build directory type ./src/pantheon-files --debug. First check that all existing pantheon-files processes are killed otherwise they will run instead.

Revision history for this message
Devinda (dsenanayaka1) wrote :
Download full text (24.8 KiB)

I tried it again as you asked. Here is the debug -

[INFO 01:06:52.149241] Application.vala:155: Files version: 0.3.1
[INFO 01:06:52.149276] Application.vala:157: Kernel version: 4.4.0-45-generic
[DEBUG 01:06:52.194289] [Gtk] Connecting to session manager
[INFO 01:06:52.194955] Application.vala:83: Report any issues/bugs you might find to http://bugs.launchpad.net/pantheon-files
[DEBUG 01:06:52.197022] PluginManager.vala:124: Loading plugin for /usr/lib/x86_64-linux-gnu/pantheon-files/plugins/core/libnetwork-places.so
[DEBUG 01:06:52.197529] PluginManager.vala:151: Loaded module source: '/usr/lib/x86_64-linux-gnu/pantheon-files/plugins/core/libnetwork-places.so'
[DEBUG 01:06:52.197599] PluginManager.vala:124: Loading plugin for /usr/lib/x86_64-linux-gnu/pantheon-files/plugins/core/libpantheon-filesctags.so
[DEBUG 01:06:52.198796] PluginManager.vala:151: Loaded module source: '/usr/lib/x86_64-linux-gnu/pantheon-files/plugins/core/libpantheon-filesctags.so'
[DEBUG 01:06:52.198840] PluginManager.vala:124: Loading plugin for /usr/lib/x86_64-linux-gnu/pantheon-files/plugins/core/libpantheon-files-contractor.so
[DEBUG 01:06:52.199352] PluginManager.vala:151: Loaded module source: '/usr/lib/x86_64-linux-gnu/pantheon-files/plugins/core/libpantheon-files-contractor.so'
[DEBUG 01:06:52.199420] PluginManager.vala:124: Loading plugin for /usr/lib/x86_64-linux-gnu/pantheon-files/plugins/core/libpantheon-filestrash.so
[DEBUG 01:06:52.202310] PluginManager.vala:151: Loaded module source: '/usr/lib/x86_64-linux-gnu/pantheon-files/plugins/core/libpantheon-filestrash.so'
[DEBUG 01:06:52.304003] gof-directory-async.vala:975: Dir file:///home not in cache
[DEBUG 01:06:52.304054] >>>>create file file:///home/devinda
[DEBUG 01:06:52.415714] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.415737] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.421531] gof-directory-async.vala:966: found cached dir file:///home/devinda
[DEBUG 01:06:52.421556] gof-directory-async.vala:966: found cached dir file:///home/devinda
[DEBUG 01:06:52.423995] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424011] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424034] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424047] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424067] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424079] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424100] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424112] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424129] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424140] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424156] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424167] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424184] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424194] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424211] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424221] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424238] plugin.vala:213: iter n_children 1
[DEBUG 01:06:52.424249] plugin.vala:216: row_iter n_children 0
[DEBUG 01:06:52.424265] plugin.vala:213: iter n_children 1
[DEBUG 01:06...

Revision history for this message
Bill (webguymi) wrote :

I no longer have the issue with smb on the current version of files.
I can't use sftp/ftp at all.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Devinda: According to the output, the problem in your case was "no route to host", which indicates a network problem or an addressing error rather than a problem with Files, I think.

Revision history for this message
Ari Selseng (ariselseng) wrote :

sftp://server where server is a ssh config name does not work for me. (It cannot resolve it), but using the full domain and custom port works.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Ari: Thanks for the information. Files relies on lower level systems to handle name resolution and network connections but you can bookmark a network location to make it easier to return to without typing the full address in or using the Connect Server dialog.

Changed in pantheon-files:
status: In Progress → Fix Committed
Revision history for this message
Ari Selseng (ariselseng) wrote :

jemeremywootten: Is there a way to specify a specific ssh key that way?

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

You may be able to do that using an ~/.ssh/config file, but not through the Files interface as far a I know.

Cody Garver (codygarver)
Changed in pantheon-files:
milestone: juno-beta1 → 0.3.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.