BUG? "Connect to server..." does not let you connect to local samba share

Trying to "Finder"->"Go"->"Connect to server..." to "smb://localhost/test" does not work and returns:
"Connection Failed This file server is running on your machine. Please access the volumes and files locally"

Why does Finder assumes that the files are locally accessible when they could be tunneled with ssh to the local smb port?

The only way you can use "Connect to server..." with an ssh tunnel is to use an address different from localhost e.g. 128.0.0.2, and use bind_address in ssh. To very convenient.

Mac OS X (10.5.5)

Posted on Sep 19, 2008 10:31 PM

Reply
13 replies

Sep 21, 2008 9:46 PM in response to petrock

I cannot access the files locally because they are not local. They are on a samba server on the other side of a firewall that only let SSH through, hence the SSH tunnel. Mounting a local samba share used to be possible in 10.4 with "Connect to Server...", it's not possible any more in 10.5. The message returned by finder is somewhat strange and implies that the files should be accessible locally, just because localhost is used. This is overlooking the SSH tunnel configuration.

Just because some but not all files on a localhost samba share can be accessed locally another way doesn't mean you should not be allowed to mount them locally. Just because it usually is a strange way of connecting to a samba server doesn't mean it should be prevented.

If this is a wanted features (rather than a bug), at least Finder should not assume that the files are local. And to be consistent, "mount_smbfs" should also complain by default about the files being local when attempting to mount something from localhost, which it does not.

And what is wrong with wanting to mount local files through a samba share? What if you want to test the permissions of your own share?

Sep 23, 2008 10:15 AM in response to petrock

So is wikipedia ( http://en.wikipedia.org/wiki/Tunnelingprotocol#SSHtunneling), which by the way suggest that accessing to local server is not that unusual. They provide an example for HTTP, and it works exactly the same with SMB. To me, preventing you from mounting a local SMB share is like preventing you from accessing you local HTTP server.


Found on the internet a way to circumvent this limitation by binding the tunnel to another address than localhost (127.0.0.1), e.g. 127.0.0.2. This however requires that you add this ip address to the loopback interface. Unfortunately you need to have admin privileges to perform that, using the following:

sudo ifconfig lo0 add 127.0.0.2

Then you can tunnel that way

ssh -2 -q -f -N -L 127.0.0.2:port:host:445 user@hostname

If you use 445 for port (the local port), you'll need admin privileges again. If you use anything larger than 1025, you won't.

Then you can "Connect to server..." to "smb://localhost:port/yourshare", you should be prompted with your login and password.

-Julien

Sep 23, 2008 10:39 AM in response to JulienW

JulienW wrote:
To me, preventing you from mounting a local SMB share is like preventing you from accessing you local HTTP server.


Except for the fact that you get write access and can conceivably initiate multiple concurrent and mutually exclusive filesystem modifications which result in data loss and/or corruption.

You're already jumping through a bunch of SSH hoops here, surely the trivial inconvenience of having to choose another address/port isn't going to shave too many hours off of your day.

Sep 24, 2008 8:13 AM in response to orangekay

Hello,

my problem is that I try to use one iTunes library on two computers - of course not simultaneously. The iTunes library sits on a Mac Mini that acts as a server, the actual files are on the same machine albeit at a different location/share, a MacBook Pro manages the library. Access from the MBP is all good, but when I try to use those same library files using the Mac Mini's own iTunes copy, the library opens all right, but as soon as I click on a title to play, I get that "please access the volumes and files locally" message.

Is there a way to make this work? Can't I create some symbolic link or the like to make the Mac Mini's ITunes copy access the media files?

I don't want to use iTunes sharing, as I would like to manage the library mainly (but if possible not exclusively) from the MBP.

Thanks a lot in advance for any input!

Sep 24, 2008 2:16 PM in response to HalRowser

HalRowser wrote:
Hello,

my problem is that I try to use one iTunes library on two computers - of course not simultaneously. The iTunes library sits on a Mac Mini that acts as a server, the actual files are on the same machine albeit at a different location/share, a MacBook Pro manages the library. Access from the MBP is all good, but when I try to use those same library files using the Mac Mini's own iTunes copy, the library opens all right, but as soon as I click on a title to play, I get that "please access the volumes and files locally" message.

Is there a way to make this work? Can't I create some symbolic link or the like to make the Mac Mini's ITunes copy access the media files?

I don't want to use iTunes sharing, as I would like to manage the library mainly (but if possible not exclusively) from the MBP.

Thanks a lot in advance for any input!

Your going about this the hard/wrong way. There is a much much simpler way to do what you want. Simply setup iTunes Sharing on the Mac Mini and have it share the entire library. Then any computer on your Network can listen to the tunes on the mini. Then, setup Screen Sharing on the Mac Mini. When you want to modify/tweak the library, simply connect to the MacMini from another machine on the network via Screen Sharing. Then you can launch iTunes on the MacMini from another machine and do what ever it is you want to do.

Sep 25, 2008 7:23 AM in response to petrock

What I'd like to do is slightly different. In my scenario, the MacBook is the computer where CDs are digitized and any other library modifications should be handled whereas the Mac Mini primarily acts as media player & server. I want to be able to pop a CD into the MBP, have it digitized & thus added to the library without further ado; then the same library should be available for playback - and the occasional tweaking - right at the Mac Mini. Most of all, the Mac Mini server operation - playback - should be completely independent from any other computer.
The same library opens fine with the Mac Mini's local iTunes; it is just that, because of the fact that the media files' location is on a share residing on the Mac Mini server itself, they can't be opened. If they were - say - on a third server, or on a NAS, so that file paths looked the same for both machines, it would probably work. But I don't want to put the files onto a NAS, I would love to keep them where they are.
I guess there should be a way to persuade iTunes to use the files even though they are on a local share?

Oct 18, 2008 8:44 AM in response to JulienW

When I click on the time capsule volume in Finder's "Shared" side panel, I see "Connection Failed" in the gray bar at the top of the window. I then click on "Connect As..." and the dialog appears "Connection Failed: This file server is running on your machine. Please access the volumes and files locally."

However, I can connect to my Time Capsule volume using Apple-K (connect to server).

I don't understand why one method works and the other does not. This problem occurs only on one machine---my other macbooks access the volume without a problem.


-------------------------------------------
Here's an older posting that I found that asked basically the same question. Unfortunately, there was no answer to this question:
--------------------------------------------
author: pamadeo
http://discussions.apple.com/message.jspa?messageID=7309217#7309217
pamadeo
Registered: Apr 16, 2008 Re: AFP Mount Error -5002
Posted: Jul 7, 2008 2:18 PM in response to: Demetrios

I'm having the same problem under 10.5.4. An additional symptom is related to networked Time Machine backups. While I can connect to the backup share via the "Connect to Server" menu item in Finder, I can't connect to it from the Time Machine systems pref pane. If I choose the share as the backup disk, I get prompt to enter username and password even though I have all the Kerberos tickets already issued and active. I reenter the password anyway, then get the same "Connection Failed" error.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

BUG? "Connect to server..." does not let you connect to local samba share

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.