Spotlight failure, depends on file location

Discussion in 'macOS' started by mtgilbert, Mar 8, 2010.

  1. mtgilbert macrumors newbie

    Joined:
    Oct 2, 2009
    #1
    I can't figure out how to solve this one. Spotlight can't find a certain document in my Documents folder, but when I move it to the Desktop, it finds it. What I've found is that files and folders I had on my old Mac are largely the ones I can't find (things I migrated over when I got my MacBook Pro in June 2009). Older documents I can't find, but new documents I put in the same folder I AM able to find.

    Now, I've tried all the basic tricks already: rebuilt the Spotlight index, cleaned caches, repaired permissions, reset PRAM, rebuilt directory with DiskWarrior, rebuilt com.apple.spotlight.plist, etc. No folders are excluded from my search, and every search kind is enabled. I THINK the problem has something to do with permissions. Many of my old folders from my old Mac say "You have custom access" instead of "You can read and write" in the Get Info window under Sharing and Permissions. I've found forums which deal with changing these conditions, but not to solve my specific problem, namely fixing Spotlight. I don't want to mess around in Terminal if I don't know exactly what I'm doing. I'm running 10.6.2. Thanks in advance.
     
  2. mysterytramp macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland
    #2
    How many folders are we talking about? Because if it's not too many, the easy thing might be to just create new folders, move the files into the new ones and trash the old ones.

    mt

    EDIT: Try duplicating one folder and seeing if Spotlight finds the documents inside. If it works, just duplicate your Documents folder, and delete the old one. (Assuming you have enough free space on your hard drive; might take a while, but it could solve the problem.)
     
  3. mtgilbert thread starter macrumors newbie

    Joined:
    Oct 2, 2009
    #3
    I can't believe that worked! Thanks, mysterytramp - now I realize you're not selling any alibis! I only tried it with one small folder, but I'll now see if it works for the entire Documents folder.
     
  4. mtgilbert thread starter macrumors newbie

    Joined:
    Oct 2, 2009
    #4
    Mysterytramp- Well, it sort of worked. I was unable to duplicate the entire Documents folder, or even SOME nested folders to get Spotlight to find my files - I had to dig down pretty deep. I can't figure out what the pattern is. Does anyone know what the underlying problem is so I can fix it in one fell swoop rather than folder by folder? Thanks.
     
  5. ViViDboarder macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #5
    I'd try to do the permissions. You just need to chown everything to your user. Find a good tutorial on that. It may have a bigger impact than you think.
     
  6. mtgilbert thread starter macrumors newbie

    Joined:
    Oct 2, 2009
    #6
    OK, I think I was able to successfully use the folder copying trick with a chmod command in Terminal. By using chmod to get rid of ACLs, I got rid of the "you have custom access" and got back "you can read and write" for various folders. After doing this, I was able to copy the folder (and replace the original) and find the file. By copying the folder I was able to get ownership of all the files (as some of the files were not owned by me). Thanks, everyone, but I'd still like to know how something this annoying happens.
     
  7. mysterytramp macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland
    #7
    What's the unix command to find out what permissions are, without changing them?

    mt
     
  8. ViViDboarder macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #8
    Code:
    ls -l
    (El Es dash El)
     
  9. r0k macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #9
    I tend to prefer ls -al because it includes . and .. and any other .files in the listing. Often permission problems are on the enclosing folder. What you want is files that are owned by you to have read and write access for you. Directories that are owned by you to have read, write and execute access for you.
    An example is

    $ chmod 664 myfile
    $ ls -l myfile
    -rw-rw-r-- 1 57 Jul 3 10:13 myfile

    The first set of permissions are for the user. The second are for the group and the last are for "world" or everybody.

    The chmod command can add these permissions on an entire heirarchy of files...

    chmod -R u+rw *.*

    By specifying *.* you are saying make sure any dot files are affected as well.

    You can also use numeric permissions with the chmod command. I don't recommend this unless you spend some time learning how the numeric mask works and about "sticky bits".

    more here...

    I answered your question about ls and chmod but I really prefer to do this sort of thing from Finder. I pick the parent folder and option-click and get info. I then scroll down to permissions and make sure I have read and write then apply to all items inside.
     
  10. mysterytramp macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland

Share This Page