Benches macOS

15

Spotlight: How to Index an AFP Share Point

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

The following example details how to index a share point named "share" for Spotlight searching.

1. Log in to a client computer as a local administrator.

2. Mount share via Connect to Server by a user who has read & write access to the share point.

3. Open Terminal and issue
sudo -s then the following commands as root:

a. Create the index for the share point:
mdutil -i on /Volumes/share

b. Publish that index so that it resides on the share point:
mdutil -p /Volumes/share

4. Unmount share. Then ssh into your server as root and switch to the path for share. Use chmod and chown to set the permissions of the .Spotlight-V100 folder accordingly:


chown -R root:admin /<path to>/share/.Spotlight-V100
chmod -R 755 /<path to>/share/.Spotlight-V100


5. Now remount the share and test a Spotlight search.

Note that this procedure does not work for static network automounts (to /private/var/automount/Network, the Network globe in the Finder) with Mac OS X 10.4 and 10.4.1.

--Gerrit DeWitt

Apple Certified System Administrator

15 replies

Sign in or join Beachball Help to reply.

  1. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    In step 4, where you're setting permissions for the .Spotlight-V100 folder, you actually only need to make sure that root is the owner and that the permissions are at least 700; the instructions I posted above leave the .Spotlight-V100 folder read-only for all users (which won't harm anything, though).

  2. 0

    Rob Rocket

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hmm,

    I wonder why Apple leaves us with a command-line "switch on for shared volumes", which has to be explained by very tech-savy users and is not so easy to understand, if you are not very familiar with the terminal.

    As for myself, I would expect a GUI-Click at least, or a "indexing on on all shared volumes for clients by default".

    Strange, strange: For "decades" we were hating Microsoft, for their Un-GUI-Windows-Quirks and now we are more and more loving Apple for going the same way... :-/

    Sorry, I dont want affend anyone, but these things (Apple Quirks) annoy me

    my two cents

    Rob

  3. 0

    O-|

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Gerrit

    is there any chance to search on a static automount? I've the problem that I mount a Volume to /Users/Shared/xxx with read only and I can't search in this folder.

    any idea?

  4. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    So far, no, I have found no way to have Spotlight search a static automount, even if it is first indexed with the procedure outlined above.

    I think the problem lies with the static mount method. In Tiger, all static mounts appear to be accessed by Guest on the server, which is expected; however typing "mount" at the Terminal on a client shows that the static mounts are mounted by the currently-logged in user. (This looks like masked AFP permissions as if you would simply connect to a server volume. That is, the currently-logged in user, either local or in a directory domain, is the owner of the mount point for any connected-to share point.) The exception is that /Network/Library appears to be mounted as securityagent (UID 92); so I think there's some strange masking going on with shared Libraries, new to Tiger.

    Spotlight will search dynamic automounts, such as those that contain a network-based home.

    --Gerrit

  5. 0

    P. Savelberg (DKV)

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    IHave done this, it founds documents now , but hwo is the update proces going, i added a file extra and that one is not indexed ... ??

    Do i have to make a seperate machine that keeps indexing, i really don't hope so ..?

  6. 0

    P. Savelberg (DKV)

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    And it is not working thrue the spotlight ican in menu bar, is this correct ... ?

    Thxs

  7. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The metadata server process (mds) running on your server will keep the Spotlight index of the share point up-to-date when new files are added. This requires that your server be running Mac OS X Server 10.4 (version 10.4.2 recommended).

    When correctly configured, you can search share points via the Spotlight menu or via the Finder's find field.

    --Gerrit

  8. 0

    P. Savelberg (DKV)

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I Have done exactly what you wrote. But it is not working for me. When i check the stat i keeps saying disabled .... When i remount the volume ...

    Patrick

    Apple Certified System Administrator

  9. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Patrick:

    I'd check the following:

    1. List the share point's contents with "ls -a": do you have the .Spotlight-V100 folder therein? Is root the owner of the folder and can root read and write?

    2. With Mac OS X Server 10.4, indexing is disabled for any mount points in /Volumes/* by default, so mdutil -s /Volumes/* should return an "Indexing Disabled" message. Even so, you should have a "mds" process running as root on the server.

    3. Have you tried a search of the share point in question? (The mdutil might be returning a disabled message incorrectly.)

    4. Log out all users on the client and only log in as one user at a time. I've had trouble with some Spotlight searches when more than one user is logged in simultaneously via Fast User Switching.

    5. Sometimes the client-side mds process stops responding with Mac OS X 10.4 and 10.4.1. Fortunately, the Mac OS X 10.4.2 update has increased the reliability of same in my experience.

    6. Make sure you're using Mac OS X Server 10.4.2 as well. Version 10.3 and earlier doesn't have a server-side mds process to update the index.

    Hope this helps. Let me know... 🙂

    --Gerrit

  10. 0

    P. Savelberg (DKV)

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Gerrit,

    Here are the results .. 🙂

    1) sharepoint : drwxr-xr-x 13 root admin 398 Aug 11 12:23 .Spotlight-V100 --> so no problem

    2) yes it is running

    3) tryed for search, but only just after indexing it works with the search field not with the spotlight icon

    4) done .. no result

    5) Running 10.4.2

    6) Server runs 10.4.2 Server version

    So if i do the trick it only works for a moment .. not the whole time ...

    Tryed trashing .spotlight trashing with mdutil -E .. and start over again ...

    I think we have to wait on 10.4.3 ... or something .. 😟

  11. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    We're missing something. I have lots of share points on different servers with Spotlight searches configured and working in this way.

    Have you tried deleting the .Spotlight-V100 folder just with rm instead of mdutil -E?

    --Gerrit

  12. 0

    P. Savelberg (DKV)

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Just a thought : are your sharepoints Disks or Folders, the sharpoints here are folders ....

    Patrick

  13. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The share points I'm using are folders housed on volumes other than the server's startup volume. In each case, the volumes are HFS+ (Mac OS Extended, Journaled) with Access Controls enabled.

    --Gerrit

  14. 0

    P. Savelberg (DKV)

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    sorry for the late reply .... same settings here ....

    Wil look in too it ... First remove with rm command ...

  15. 0

    P. Savelberg (DKV)

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    New Try, same result ....

    My Sharepoints and disk have spaces in de name ..Is it possible that is causing the problems .. ?

    In thes spotlight menu it is not working, only in the search bar when i selct te server ...

    All commands where excuted without any error's

    So what is going wrong ..? It would be very handy if it works ....