LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-27-2017, 09:15 AM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,966

Rep: Reputation: 159Reputation: 159
"Connect to server" in file manager question


I am taking the liberty to post this question to the Newbie forum as it is simple (I think) and the answer will be simple (I hope!)

If I wish to access a file on a server from a client I can connect in several ways. I generally export the file system(s) on the server with nfs and mount the exports on the client with autofs/automount. Works great.

When I was running Samba on the server to allow Windows machines to access the server I could connect from a Linux client with the Samba client or Cifs client. (No longer have any Windows machines, don't do Samba any more.)

When I need to make a temporary connection I generally use the "Connect to server" feature in Nautilus (or Caja on Mate). The dialog asks for the server name or address, the port (which seems to be ignored), the "Type" which I set to SSH, the starting folder and my credentials. When I make the connection an icon appears on the Desktop representing a folder with a wire below it (signifying the network I guess) and a name such as "ken on taylor20" with ken being me and taylor20 the name of the server. So far, so good...

If I click on the icon it opens the server file system in Nautilus or Caja in my case. When I am done accessing the server I can right click on the icon and I am invited to "Unmount" which breaks the connection. As I can Unmount it sort of implies that the server file system is somewhere MOUNTED. My question is WHERE???

I have examined some of the usual suspects and (until writing up this post) have never found the location. Just now I did find what appears to be the mount point
Code:
/run/user/1000/gvfs/ken@vmCentOS7Mate sftp:host=taylor20,user=ken
However, this mount point does not seem to act like an nfs (auto)mount point. For example:

I have an automount on the client pointing to the server and configured thus:

The server /data directory appears on the client at /nfs/data

If I run a search for a file which I know is on the server in the /data directory I see the following
Code:
[ken@vmCentOS7Mate ~]$ sudo find / -name Eisenhower
[sudo] password for ken: 
find: /run/user/1000/gvfs: Permission denied
/nfs/data/Eisenhower
On the other hand if I search for a file which is on my Desktop on the server - which should be accessible as I have done a "Connect to server" to the root of the server - I see
Code:
[ken@vmCentOS7Mate ~]$ sudo find / -name Gorsuch
find: /run/user/1000/gvfs: Permission denied
As I now know that the "mount point" is under the directory to which I am denied permission I am even more confused that I was yesterday when I had not located the mount point. If I run ls on the mount point it seems to work
Code:
[ken@vmCentOS7Mate ~]$ ls /run/user/1000/gvfs/sftp:host=taylor20,user=ken
bin   dev   ken    lost+found  mnt  opt         root  srv  usr
boot  etc   lib    media       net  proc        run   sys  var
data  home  lib64  misc        nfs  quitelarge  sbin  tmp  xtra
To further confuse myself I tried running the find as me rather than with root permissions. In this case I unmounted the Connect to server to the server root and reconnected to /home/ken/Desktop where the desired file resides. Here are some abbreviated reslts
Quote:
[ken@vmCentOS7Mate ~]$ find /run/user/1000 -name Gorsuch | grep Gorsuch
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/228030540000_19728/remoteDevice-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/228030540000_19728/vmx-vmdb-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/228030540000_19728/mks-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/228030540000_19728/testAutomation-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/228030540000_19728/vmx-live-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/228030540000_19728/vmx-vigor-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/40840050000_16134/remoteDevice-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/40840050000_16134/vmx-vmdb-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/40840050000_16134/mks-fd: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/run/vmware/1000/40840050000_16134/testAutomation-fd: Input/output error
...
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/data/data/config files/prod/t20-CentOS 7 mate/home/ken.ok/.wine/dosdevices/z:/run/systemd/journal/socket: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/data/data/config files/prod/t20-CentOS 7 mate/home/ken.ok/.wine/dosdevices/z:/run/systemd/journal/stdout: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/data/data/config files/prod/t20-CentOS 7 mate/home/ken.ok/.wine/dosdevices/z:/run/systemd/cgroups-agent: Input/output error
find: /run/user/1000/gvfs/sftp:host=taylor20,user=ken/data/data/config files/prod/t20-CentOS 7 mate/home/ken.ok/.wine/dosdevices/z:/run/systemd/notify: Input/output error
This tells me that my "mount point" is not starting at the location where I told it to start.

Bottom line...

Now that I know where the "mount point" is located (I am beginning to wish I didn't ) would someone kindly tell me what is this tiger to which I now have hold the tail?

My original goal was to locate the mount point, be able to establish such a mount point by command and/or script and to access files over that mount point as I would an nfs mount point. If nothing else the SSH connection would encrypt the traffic in transit.

TIA,

Ken
 
Old 09-27-2017, 09:28 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,821
Blog Entries: 15

Rep: Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664Reputation: 1664
Often what you're doing in the desktop windows managers are making their own view of things. You see this not only with NFS mounts like you describe but also with USB mounts and CDs.

As an FYI to see what has been shared from another server you don't have to NFS mount it if you have the net setup (which you would by default) in automounter. You can just go to /net/taylor20 to see the files. You won't see that NFS mounted until after you've accessed a directory under it (e.g. /net/taylor20/home).
 
1 members found this post helpful.
Old 09-27-2017, 09:48 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,551

Rep: Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144Reputation: 3144
Here is some background information.

https://en.wikipedia.org/wiki/GVfs

The temp mount point /run/user... is only valid while "mounted" in the file browser. You can manually mount the share without using nautilus "connect to server" via the gvfs-mount command.

A another option might be to use sshfs which is a fuse filesystem and can be auto mounted via autofs just like nfs. It is also using sftp in a similar manner to GVfs.

https://en.wikipedia.org/wiki/SSHFS
 
1 members found this post helpful.
Old 09-27-2017, 01:14 PM   #4
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,966

Original Poster
Rep: Reputation: 159Reputation: 159
Thanks MensaWater,

I agree. The window manager is certainly doing its own thing. Interestingly although I selected "SSH' as the type the link shows sftp.

Thanks michaelk,

I had started to research gvfs but had to leave for some errands. I will take a look at the links which you provided.

Ken
 
Old 09-30-2017, 07:54 PM   #5
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,966

Original Poster
Rep: Reputation: 159Reputation: 159
I did some more investigation. When I established the connection this morning and navigated to the location in a terminal I found some strange results.
Code:
[ken@vmCentOS7Mate gvfs]$ pwd
/run/user/1000/gvfs
[ken@vmCentOS7Mate gvfs]$ ll
ls: cannot access sftp:host=taylor20,user=ken: Input/output error
total 0
?????????? ? ? ? ?            ? sftp:host=taylor20,user=ken
[ken@vmCentOS7Mate gvfs]$
After leaving the connection for some hours including a couple of suspent/resumes of the host computer (taylor20) I got different results
Code:
[ken@vmCentOS7Mate gvfs]$ pwd
/run/user/1000/gvfs
[ken@vmCentOS7Mate gvfs]$ ll
total 4
dr-xr-xr-x. 1 ken ken 4096 Sep 23 19:03 sftp:host=taylor20,user=ken
[ken@vmCentOS7Mate gvfs]$ ls sftp\:host\=taylor20\,user\=ken/
bin   dev   ken    lost+found  mnt  opt         root  srv  usr
boot  etc   lib    media       net  proc        run   sys  var
data  home  lib64  misc        nfs  quitelarge  sbin  tmp  xtra
I then unmounted the Desktop icon representing the connection and reconnected. Again I get the I/O error message. I then clicked on the bookmark to the connection under the Places menu. After this I can read across the mount point. Strange...

Ken
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] X: "loading extension glx" "no screens found" "fatal server error" (w/ nvidia driver) Geremia Slackware 7 12-29-2014 12:00 PM
[SOLVED] "net rpc" "failed to connect to ipc$ share on" or "unable to find a suitable server" larieu Linux - General 0 11-09-2014 01:45 AM
Fluxter "Cannot connect to window manager" cotton213 Linux - Desktop 1 07-25-2007 04:43 PM
Error: "Tried to connect to session manager, Authentication Rejected, reason : None" randomx Linux - Software 0 01-24-2005 04:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration