Mount filesystems (NFS & SSHFS) on specific network comming up

Hi,
I'd like to mount some NFS and SSHFS shares when a specific network/interface has a connection. How can I do this?
Thanks for your help in advance.

The problem was how the exports were configured from the Synology box. I tried to specify access for my whole subnet using 192.168.1.* as the host specification. A more thorough reading of the /etc/exports man page statement on wildcards notes the following: "Wildcards should not be used with IP addresses; however, it is possible for them to work accidentally if reverse DNS lookups fail." In my case, my servers had DNS (and therefore presumable revers DNS) entries, and therefore mounts failed. My clients (largely laptops) get a DHCP address from my router, and don't have DNS entries in my domain. Therefore, the mounts "worked accidentally" from my clients, and not from my servers.
I'm now adding "works accidentally" to my lexicon of strange & wonderous software development feature terms, along with "bug-like feature". Now that I've calmed down enough from the lost week of spare time, I should be able to submit an RFE to Synology without using any profanity. Had I entered the offending wildcards by hand-editing the exports, I'd hold myself entirely responsible. Since I did this with the Synology UI, it seems reasonable to expect that I'd at least see a warning that my host spec was potentially not going to achieve the intended results.

Similar Messages

  • Mounted local NFS drives take down Finder after move out of network

    Hello,
    This is a basic scenario that happens to me often. At home, I mount several NFS drives from my linux server. They work fine. If i close my MBP, don't shutdown, and take it with me to a new location outside of my local network, I still see my NFS drives mounted. After a while, I will get a prompt saying that those drives are no longer available, or some such language.
    However, if I try and unmount them from the finder or try and access those drives, the is Finder done for, and all computer functions for that matter, like volume, brightness.
    I have left it that way for up a half-hour before hard re-starting.
    I know I should unmount the drives before I take the computer with me, but honestly, I will continue to forget.
    Is there a way to avoid this, like setting a timeout of a 1 minute or so, if the drive is not available?
    Thanks for your time,
    Chuck
    MBP Mac OS X (10.4.9)

    Hello,
    This is a basic scenario that happens to me often. At home, I mount several NFS drives from my linux server. They work fine. If i close my MBP, don't shutdown, and take it with me to a new location outside of my local network, I still see my NFS drives mounted. After a while, I will get a prompt saying that those drives are no longer available, or some such language.
    However, if I try and unmount them from the finder or try and access those drives, the is Finder done for, and all computer functions for that matter, like volume, brightness.
    I have left it that way for up a half-hour before hard re-starting.
    I know I should unmount the drives before I take the computer with me, but honestly, I will continue to forget.
    Is there a way to avoid this, like setting a timeout of a 1 minute or so, if the drive is not available?
    Thanks for your time,
    Chuck
    MBP Mac OS X (10.4.9)

  • How can a mount a NFS share exported from OpenBSD?

    Hello Apple Discussions:
    I've been experimenting with NFS in a mixed OS environment, and have been successful exporting nfs share with tigerserver, and mounting it on both a powerpc linux system, and on a powerpc openBSD system.
    Likewise, I can export a NFS share from the linux powerpc box, and mount it on the openBSD box and on the tigerserver, although, the latter required using the options (ro,sync,insecure) in my exports file.
    However, when I export a share on the OpenBSD box, I can mount it on the linux box, but not on tigerserver.
    I would like for the OpenBSD box to export a NFS share securely, with read-write permissions, to the tigerserver.
    After reading so many tutorials, that it would be a page of links, just to list them all, I am pulling my hair out. However, I have found one thread that suggests, that perhaps what I'm trying to do is impossible:
    http://www.bsdforums.org/forums/showthread.php?t=54308
    Here it is suggested that the NFS won't work because tigerserver is not using UTF-8?
    I will have to say, that I was somewhat alarmed, that the only times I succeeded in mounting an nfs share exported from linux onto tigerserver, it was when the "insecure" option is used in the /etc/exports file. There doesn't seem to be an equivalent for the linux style exports option "insecure", in the bsd style options of --maproot=user:group1:group2.
    But I don't like using any options that say "insecure" anyways, so rather than trying to find out how to make openbsd "insecure", I would rather like to find out if there is a way to get tigerserver using UTF-8, at least when mounting NFS shares, if this is indeed the issue.
    Here are the more technical details. I've created a user on all sytems named "fives" with the userid of 5555 and the groupid of 5555. I made the user local user in the local net info domain, but I've tried it with an LDAP user as well. The folders I wish to export and the folders into which to mount them are all owned by user fives and group fives, and have permissions set to 0775. The ip addresses are OpenBSD=192.168.222.111 TigerServer=192.168.222.233 LinuxPPC=192.168.222.253. I've included the relevant NFS setup files and running processes below:
    ON THE OPENBSD BOX:
    #/etc/exports
    /fives -alldirs -network=192.168.222.0 -mask=255.255.255.0
    /exports/fives -mapall=fives:fives 192.168.222.233 192.168.222.253
    #/etc/hosts.deny
    ALL: ALL
    #/etc/hosts.allow
    ALL: 192.168.222.233 192.168.222.253
    #/etc/rc.conf.local
    portmap=YES
    lockd=YES
    nfs_server=YES
    #here's proof that the daemons are running on the OpenBSD box;
    rpcinfo -p localhost
    program vers proto port
    100000 2 tcp 111 portmapper
    100000 2 udp 111 portmapper
    100005 1 udp 863 mountd
    100005 3 udp 863 mountd
    100005 1 tcp 613 mountd
    100005 3 tcp 613 mountd
    100003 2 udp 2049 nfs
    100003 3 udp 2049 nfs
    100003 2 tcp 2049 nfs
    100003 3 tcp 2049 nfs
    100021 1 udp 895 nlockmgr
    100021 3 udp 895 nlockmgr
    100021 1 tcp 706 nlockmgr
    100021 3 tcp 706 nlockmgr
    # actually, I don't see statd, but haven't found the equivalent in openbsd. There's rpc.rstatd, and maybe it should be listed here, but there doesn't seem to be a way to launch it directly. This is a competitor with the UTF-8 theory about why it's not working.
    ON THE TIGER SERVER:
    # here's proof that tiger server sees the mounts:
    showmount -e 192.168.222.111
    Exports list on 192.168.222.111:
    /fives 192.168.222.0
    /exports/fives 192.168.222.233 192.168.222.253
    # here's the result of user fives' attempt at mounting a share:
    sudo mount -t nfs 192.168.222.111:/exports/fives /imports/fives
    mount_nfs: /imports/fives: Permission denied
    # yet user fives has no problem mounting same share on linuxppc box.
    What is different about OSX server? I thought it was supposed to speak NFS?
    ---argh... I'm steppin out for a pint.. Hopefully when I'm back it'll just work.

    One thing not mentioned is that if you decide on the multiple user approach, you can have your music folder in Shared Documents so you only store the tracks once.
    Each user is free to choose which of those tracks they want in their library.
    There is an Apple help article on multiple users.
    http://docs.info.apple.com/article.html?artnum=300432

  • Mounting an NFS share

    Hi,
    I'm attempting to mount an NFS share and having no success.  Regardless of the settings I try, the Finder still denies me access to the NFS share, even though it mounts fine.  I seem to have no read or write access to the share.
    I've tried exporting the share (in /etc/exports on the server machine) in two ways: with
    /home/REDACTED/share     REDACTED/28(rw,sync,all_squash)
    And
    /home/REDACTED/share     REDACTED/28(rw,sync,insecure,all_squash,anonuid=1001,anongid=1001)
    In the second example, the anonuid and anongid are those of the shared folder's owner and group.  I added "insecure" because a how-to on the web claims that OS X won't work with any shares that don't have this specified.
    With either of these settings applied, Disk Utility verifies the existence of the share, and mounts it.  However, I can neither read files within, or add files to, the shared folder.  The error produced is:
    The folder “share” can’t be opened because you don’t have permission to see its contents.
    I have tried the following Advanced Mount Parameters, each to no effect:
    nodev resvport nolocks locallocks intr soft wsize=32768 rsize=3276
    nodev nosuid resvport nolocks locallocks intr soft wsize=32768 rsize=3276 ro
    nodev,nosuid,resvport,nolocks,locallocks,intr,soft,wsize=32768,rsize=3276
    nodev,nosuid,resvport,nolocks,locallocks,intr,soft,wsize=32768,rsize=3276 ro
    resvport,nolocks,locallocks,intr,soft,wsize=32768,rsize=3276
    -i,-s,-w=32768,-r32768
    -P
    I'd rather not employ SAMBA, and the Apple File Sharing package for my server's OS (Ubuntu 11.10) appears to be bugged currently.  Besides, NFS would be a far neater solution.
    Any helpful advice?
    S.

    Scotch_Brawth wrote:
    I've simply come at NFS as being the most appropriate file-sharing implementation for my needs - it supports automatic mounting at boot using tech native to both my Linux OS and OS X. 
    That is part of the problem. NFS is designed for environments where all servers are mounted (by root) at boot time and permissions are managed via NIS or LDAP. That is the default setting. If you are using something else, it requires some hacking.
    I've had SAMBA working in the past, but I guess a certain air of contamination creeps in when using a Windows protocol to allow interaction between two UNIXy systems.
    Plus, you would now have two different 3rd party reverse-engineered reimplementations of a foreign protocol.
    AFP would be great, but despite receiving support on the Ubuntu forums and IRC, I failed to get it to work - it may be bugged; which would not be surprising, as 11.10 (with Kernel 3) has proved problematic in several other ways.
    Perhaps Ubuntu is targeted more towards desktop rather than server usage. About the time I last played with NFS, I also played with Netatalk - with disastrous results. Supposedly Netatalk is better now. It's authors would be more than happy to sell you a support package.
    I did use the default settings - they failed to allow a working NFS share.  I then applied the variety of settings as recommended by apparently knowledgeable people.  Still no success.  I have read that UID/GID settings are an important aspect of NFS, but the issue in this case (as far as I understand it) is that all UID/GIDs below 1000 are privileged in Ubuntu 11.10, whilst on OS X these are below 501.  So, the choice is either to give the shared folder owner a privileged UID/GID pair, or change the UID/GID of my Mac users to meet the NFS servers needs - not something I'm happy to do for so small a gain.
    You can create a throwaway account on the Mac and just reset the GID/UID to values equal to an account on the Linux machine. That would establish that it is properly working in the default configuration. Then you could edit /etc/idmapd.conf.
    For that reason, I use the "all_squash" option, because the share in question is not for anything remotely critical and the data to be transferred and stored is both worthless and transitory.
    Since all_squash maps everything to nobody, you would have to hack up the permissions on the server to make everything world writeable. I think it will work with /etc/idmapd.conf and without all_squash.
    I know nothing about NFS other than that its capabilities and integration meet my needs.
    Just what are your needs? If the data is worthless and not critical then Netatalk might be the best option. If you can't get that to work, you could try MacFUSE on the Mac side and mount over sshfs. That is normally what I do. It isn't all that reliable, but you don't seem to require that.
    What information I did find regarding OS X and NFS was that there were peculiarities that required certain settings to be present on the server and the client respectively - for example, OS X apparently requires "insecure" to be set as an option, or it simply won't connect properly.  I don't know why, but I have no choice to trust to the advice of others in this case, until I have sufficient grasp to take care of the whole thing myself.
    This goes back to the expectation that NFS expects to be always connected and mounted by root. Apple sells very few desktop machines anymore so it assumes a different, user-centered environment. You could use "insecure" on the server side to allow connections from "insecure" ports > 1024 that a regular users can connect with via the Finder. You could use the terminal with "sudo mount_nfs -o resvport" to tell the Mac to use the root user to connect via a secure port instead.
    If you genuinely think you're able to help, then I'm happy to hear your advice.  What would you recommend?
    I appreciate your meeting me halfway. I think all you really need is /etc/idmapd.conf without all_squash. Then you could setup AutoFS and you could use NFS in a modern environment without even bothering to mount it.

  • How do I mount a partition at a specific mount point.

    How do I mount a partition at a specific mount point? For example I see a Vol01 disk image, which is a partition of one of my hard drives, sitting on my desktop. Under the disk utility it says that its mount point is /Volumes/Vol01. How do I mount this partition as a file system at /Users?
    Thanks, much appreciated.

    why do you want to do this? it sounds like you want to keep your home directory on an external drive. this can be done without changing the mount point of the external. copy the home directory to the external. then in system preferences preferences->accounts, unlock the lock at the bottom, control-click on your user and select "advanced options." In the resulting popup change the location of the home directory to the external.
    in general to change the default mount point of a drive see this link
    http://beta.jamesstroud.com/jamess-miscellaneous-how-tos/os-x-admin/os-x-firewir e-mount-point

  • How to mount a NFS that filename will forces to lowercase

    Hi all,
    How can I mount an NFS that filename will appear as lower case?
    The NFS used stores filename in upper case while application porgram run on Sun Solaris only accept lowercase filename. now I'm getting trouble in upper/lower case file name.
    All nightmare begins in a product named "Snap! Server" . This server claims compatible with Microsoft Windows NT server, Novell Netware server, Apple Share Server, UNIX NFS server and WWW server. In my case, I used it as a Novell Netware and UNIX NFS.
    The Snap Server is considered to replace my old Novell Netware Server, with can exports it volume as NFS, such that Solaris machine can mount it. Files are required to import/export form Dos/Windows client and process in Solaris via Novell. And the Snap! server will be a bridge between DOS/Windows client and Solars workstation since it can as Netware Server and NFS as the same time.
    It works well in both Novell Netware and NFS well, but ...
    When I trying to write a file from DOS client and read it in Solaris, the filename appears as UPPERCASE! The old Novell store filename in 8.3 upper case and the NFS module can convert filename into lowercase. While Snap! considers as NFS, it exports filename as uppercase ( I just simpley use command "mount server_name:/export_volume /mount_point") I'm now seeking solution that, after Solaris mount this server, filename will be seen as lowecase all the time, without user involve.( I have no case-sensitive problem in my case). When I ask my vendor, he said he never met such case before! The OS version is Solaris 2.5.1.
    If anyone know how to made it, please send me a e-mail.
    Sodium

    Answer for NFS who forces lowercase filenames:
    You can mount that filesystem as a PCFS type filesys. You can then use
    the mount option foldcase to force an uppercase file to be seen as a lowercase file. And that's about all. If you have any questions you can mail me at:
    [email protected]

  • Safari Won't Connect To Specific Network. Firefox Will!

    I have a specific issue with Safari (and Mail.app) on a specific network I try to connect to.
    The network is one offered on a train service, and pre-Lion I've been able to connect to it just fine.
    All of a sudden my MBP and MBA are able to connect to the network - but if I try and start Safari it just bounces away in the dock.
    On the rare occasion that Safari starts it won't connect to any webpages. Mail.app also refuses to work in the same way.
    If I use Firefox - I can use the internet as normal (although I still have issues with Mail.app).
    The bigger issue occurs when I am off the train and trying to use my laptop on other networks - Safari and Mail continue to refuse to work, even though the laptop tells me I'm connected. I have to restart the entire machine.
    I've deleted networks from the SysPrefs, reordered them, tried a Google DNS etc etc. I've Googled the issue like crazy, and even contacted the train operator! - and so far come up with nothing.
    Any help would be much apprecieted.

    Do you have anti virus software installed or any apps like Little Snitch?
    Try deleting the cache associated with Safari.
    Go to ~/Library/Caches/com.apple.Safari
    Move the Cache.db file from the com.apple.Safari folder to the Trash.
    Restart your Mac, try Safari.
    ~ (Tilde) character represents the Home folder.
    For LIon:   To find the Home folder in OS X Lion, open the Finder, hold the Option key, and choose Go > Library
    Message was edited by: Carolyn

  • Using a specific network interface

    Hello, I would like to know how I can force Mac OS X to use a specific network interface while connecting to my mac mini (from the iMac):
    I'm connected to the internet (I mean the local network) using the airport, and I connected my iMac with the mac mini using an ethernet cable (because I want to transfer files faster, and I don't want to reboot my mini in target disk mode), but when I connect to the mini (using the "share" feature) it seems to use the airport connection. Of course I could disable the airport interface to force it to use the ethernet one (and it works) but I don't want to...
    So, how can I force a specific interface? I don't mind using a command line command to mount it initially btw.
    Thanks

    Hello, 
    Try using a different IP address range to put each interface in a different subnet. For example use 10.0.0.x and 255.255.255.0 for the Ethernet connection and 192.18.2.x and 255.255.255.0 for the Airport.
    mrtotes

  • HT4628 Trouble getting into specific networks in network preferences

    When I enter network preference, click Advanced, and try to double click on a network name to get into the security of a specific network, nothing happens when I double click. I used to double click, and the window would come up with the security settings, and I could change the password, etc. Why isn't this working? Pressing "return" doesn't do anything either. Thanks ahead of time for your time in helping me out!

    I don't know what you deleted; I didn't advise you to delete anything. You may need to restore one or both of the following items from your backups. The first is in your home folder. Restore the second item only if you were prompted for your administrator password, and entered it. After restoring, log out and log back in.
    ~/Library/Keychains/login.keychain
    /Library/Keychains/System.keychain

  • Mail: How to check an account ONLY from specific Network Location?

    I use multiple macs, and use my .mac account to synchronize mail accounts, rules, smart mailboxes, signatures, etc.
    However, I'd actually like to specifically NOT check certain accounts on some machines.
    Even though the account settings are synced, I thought I might be able to take advantage of "Network Locations" to create specific network locations like HOME or WORK and thusly create a combination of mail and network location preferences that would solve my particular need. The idea being that it would allow me to specify in mail's settings (somehow) that a particular mail account should only check the server for messages if the current network location is actually WORK, and if the network location was HOME, it should just not check.
    Some other apps (ie: Snerdware's Groupcal) will check the network location setting and not perform checks if the current location is not the expected one.
    So the question is, is there some way to make Mail.app 2.1.3 on Tiger do this?

    30 messages displayed is the default, but you can change that.  On your email page, under "settings" is an option to change the number of messages per page.  One  option is "no limit."

  • HT4199 I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need a

    I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need advice.

    What type network is yu router set up for? The 4G iPod can only connect and see 2.4 GHZ networl like B, G and the 2,4 GHz N. There is also a 5 GHz N but the iPod will not even seethat network.
    See:
    iOS: Troubleshooting Wi-Fi networks and connections
    iOS: Recommended settings for Wi-Fi routers and access points

  • Many of the times my Iphone 5s shows "No Service" in the specific network area, but if the same sim card is used with other mobiles in the same network area, it shows good network.. i did restore but still not working.. please help me..

    My Iphone 5s shows "No Service" in the specific network area, but if the same sim card is used with other mobiles in the same network area, it shows good network.. i did restore,change sim card, reset all the settings but still not working... please help me..

    Please do not double post a subject. Iphone 5S  I answered your other thread.

  • Using manual IP address only for specific networks

    For my home network I use DHCP with manual address because I have to forward some ports specifically to my computer. However this causes problems when connecting to other networks. For some reason this setting stays active even when using other networks. Therefore, I can't connect to say my school network because the setting has to be set to plain DHCP. Is there a way to use manual IP address only for specific networks?

    System Preferences > Network > Locations and add a location for your home with its manual settings. Add a location for other DHCP locations. Then when you want to connect at another DHCP location select that location from your locations dropdown.

  • Airport refuses to connect to selected "Specific Network"

    In Network under System Preference, I have my home wi-fi selected as the "Specific Network" on the Airport panel. About half the time the MBP wakes, it will connect with a neighbor's wi-fi. I've restarted the machine, changed the setting and restored it. Nothing works. This started acting up only a couple weeks ago. I've had this MBP since December.
    MBP 15" C2D   Mac OS X (10.4.9)  

    Thank you, BDAqua. Creating a new network location solved my problem. I would've replied earlier; I wanted to be sure it continued to work over a few days.

  • By default: join a specific network

    I was using 128 bit WEP until just tonight when I got a new wireless router which does WPA. While using the WEP encryption, my computer was set to join my wireless network by default. This worked perfectly, upon restarting my computer it would automatically reconnect to the internet and all.
    Ever since the change to use the new key and WPA, when the computer restarts it does not automatically join the network any longer. In the network tab of system preferences everything is set to automatically join the network, but it doesn't. I know the settings to join the network are correct because when I choose the network from the airport menu item at the top of the Finder, it connects no problem without asking for any keys or passwords of any kind.
    Any ideas?
    I would like to have this work properly as I run a server off of my machine and need it to be running in the even I should lose power and the machine restarts while I'm not home.

    I've got a similar problem. Everything was fine and then I accepted a software update for iTunes and Quicktime. Now, my Mac won't connect to my network automatically. It's a 128 bit WEP key, and I've gone into network connections to verify the "specific network" settings. Seems like it doesn't want the 26 character key.

Maybe you are looking for