12

i'm having the following problem with my network shares from my NAS (Synology 415+ if it matters) in Yosemite.

At home, we have an iMac with two different users. I moved all of our media (music & photos) to the NAS, so that both users could use the data with the according apps. I thought, that it would be easy to mount the network shares for both users, but actually it isn't - or i'm doing something wrong.

I'm using a simple Applescript in the following form

tell application "Finder"
    activate
    mount volume "smb://ipaddress/sharename/"
end tell

that is started automatically when my user logs into the system.

That works fine for me. But when my partner switches to her user account, the mounts aren't accessible for her. Moreover, when she starts the same script as i do, the paths are getting messed up:

If two users mount the network shares, two different folders exist on the system: /Volumes/music for the first user and /Volumes/music-1 for the second user, which messes up all file paths (especially in iTunes, but also in Lightroom or other apps).

Is there ANY way to mount a network share for both users? I really don't care if i use AFP or SMB, i just want a network share which is usable for multiple users. Seems like a common scenario for me.

2
  • undeleted & updated my answer
    – klanomath
    Commented Nov 26, 2014 at 0:09
  • @softandsafe I am having the same exact problem. I have 4 users on my Mac. What each person accesses the server (//HTPC-i3/Data) they get /Volumes/Data-1, /Volumes/Data-2 and /Volumes/Data-3 which blows Office's mind when trying to access docx and xlsx files on that server. Did you find a good solution?
    – user121749
    Commented Apr 12, 2015 at 23:19

4 Answers 4

4
  1. Setup your NAS to export a NFS-share. Refer to the Synology knowledgebase how to do this or use the following how-to to set it up, fine tune and secure your set-up.

    You may do it manually in the command line also:
    Let's assume your media folder is /Shares/Media. Create or edit a file named exports in /etc. The example below restricts the access to computers with an IP address in the range 192.168.0.1 - 192.168.0.254. You may have to restart your NAS or at least nfsd (nfs-daemon).

    Linux/NAS file /etc/exports:

    /Shares/Media 192.168.0.0/255.255.255.0(rw)
    

    if you use a Mac Server use this line:

    /Shares/Media -network 192.168.0.0 -mask 255.255.255.0
    
  2. Edit /etc/auto_master on your Mac and add the line:

    /-                                  auto_media
    

    file /etc/auto_master:

    #
    # Automounter master map
    #
    +auto_master                        # Use directory service
    /-                                  auto_media
    /net                                -hosts      -nobrowse,hidefromfinder,nosuid
    /home                               auto_home   -nobrowse,hidefromfinder
    /Network/Servers                    -fstab
    /-                                  -static
    
  3. and create a new file auto_media in /etc on your Mac

    file /etc/auto_media:

    /Media         IP-NAS:/Shares/Media
    
  4. Please don't forget: all files mentioned above need a trailing empty line

  5. enter sudo automount -vc in Terminal on your Mac with the output:

    $ sudo automount -vc
    automount: /Media updated  
    automount: /net updated  
    automount: /home updated  
    automount: no unmounts  
    

/Media will now always be visible in the root folder of your Mac and accessible for both of you as long as the NAS is up & running. No Apple Script to mount it nor a Connect to Server needed.

(Set up and tested on a Server 10.7 (no Synology NAS, because i don't own one, but it shouldn't make a difference) and Client 10.9)

0

I followed klanomath's solution and first it did not work for me. To mount your shared folders on OSX you need to do the following extra:

Enable "Allowed non-privileged port" in the Synology NFS Permissions tab of an NFS rule. See here why.

By the way, to add your mount to your volumes in finder, in /etc/master use:

/../Volumes/ auto_media

-1
  1. Go to System Preferences
  2. Click on ‘Accounts’ or 'Users and Groups', depending on your version of OS X
  3. Click on “Login Items” for that user (may need to click the Lock in the bottom left corner to unlock)
  4. Click on the + button to add another login item
  5. Locate the network drive you previously mounted and click “Add”
  6. Quit System Preferences
1
  • 2
    That isn't solving the above mentioned problem. Commented Nov 25, 2014 at 19:42
-4

AutomounMaker is an easy to use GUI tool (DONATEWARE OS X native Universal Binary) to create scripts that will mount an AFP, FTP, WebDAV(http), NFS or SMB network share. You can use the script as a Startup Item in your user's session config to automatically mount the given share upon login. If you use always the same shared volume on your desktop, AutomountMaker is more easy than the classic Connect to Server... proposed by Apple. Go to http://jm.marino.free.fr/index.php?switch=sw_&title=AutomountMaker

1
  • I hesitate to flag the answer as spam. Though the answering person doesn't explicitly confirms his affiliation to the product, it's obvious because he doesn't hide/mask his name and his name relates to the URL. Additionally the product is donation-ware and no commercial app.
    – klanomath
    Commented Aug 31, 2015 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .