Home
Posted By: Douglas Weird Safari/System issue - 12/12/14 03:58 PM
I've had my new mini for about 5 months now with OS 10.9.5. Safari was been loading slowly almost since the beginning and finally got around to doing some exploring.

I looked in my home library folder to check the Safari Cache Folder and there is no such folder in my Home/Library/Caches folder.

I then opened Console to see if that showed anything. There are many many error messages that say "could not create /users/myhomefolder/library/caches/Safari. . . ". Then I noticed that my home folder is "myhomefolder1".

How do I get Safari to create a cache folder in 'myhomefolder1' when it's reporting an error looking for 'myhomefolder'.

Scrolling back through Console I see other applications using 'myhomefolder1' which is the correct time of my home folder.

Thanks in advance.
Posted By: Virtual1 Re: Weird Safari/System issue - 12/12/14 07:10 PM
if you change the name of your home folder, a "properly written" app shouldn't have a problem with adapting. Any app that stores file path information should store it relative to your home folder, and the root, the home folder itself, should not be specified. That's what the tilde (~) is for in terminal.

Your caches folder should NOT be getting stored as
/Users/myusername/Library/Caches/appname
it SHOULD be getting stored as
~/Library/Caches/appname

So if you change your home folder name, there's no problem there. Or what if you rename your hard drive, or your home is on a network share or an attached drive? all sorts of good reasons not to store "absolute paths" in a preference file.

I'm surprised safari does that.

You could change your home folder back to what it was before. You'll need to do that carefully to avoid misplacing it.
Posted By: ganbustein Re: Weird Safari/System issue - 12/12/14 09:07 PM
Originally Posted By: Virtual1
if you change the name of your home folder, a "properly written" app shouldn't have a problem with adapting. Any app that stores file path information should store it relative to your home folder, and the root, the home folder itself, should not be specified. That's what the tilde (~) is for in terminal.

A properly written application won't store paths to "well-known" folders at all. As long ago as System 7, which completely re-organized the System folder, there was a problem with apps that hardcoded paths. The FindFolder function was introduced to let an application ask the OS at runtime things like "where is the Fonts folder?". Without asking each time, a program couldn't run properly under both System 6 and System 7. A "caches" folder wasn't on the initial list of "well-known" folders, but was added by System 8, where an application could ask "Where is the folder of type kCachedDataFolderType from kUserDomain?"

The call has changed over the years. FindFolder got replaced by FSFindFolder, which has now been replaced by NSFileManager's -URLsForDirectory:inDomains: method, but the principle remains the same. An application will ask "What are the URLs for directories that I can use for caching data in the user domain?"

Equivalently, starting with OS X 10.5 Leopard, getconf DARWIN_USER_CACHE_DIR at the command line will tell you where the cache directory is.
Originally Posted By: Virtual1
Your caches folder should NOT be getting stored as
/Users/myusername/Library/Caches/appname
it SHOULD be getting stored as
~/Library/Caches/appname

And the answer to the question "Where should I cache data" also changes over time. For some time now it has been a subfolder of /var/folders, but which subfolder seems to keep changing.

Originally Posted By: Virtual1
I'm surprised safari does that.

I doubt very much that Safari is doing that. This looks like a poorly written program that thinks it knows where Safari is caching data, and wants to dumpster dive. Sounds highly suspicious to me.
Posted By: Douglas Re: Weird Safari/System issue - 12/12/14 10:53 PM
Here is the exact Console message:

12/12/14 3:44:06.446 PM Safari[65665]: could not create "/Users/HomeFolder/Library/Caches/Safari", error Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “Safari” in the folder “Caches”." UserInfo=0x6180002711c0 {NSFilePath=/Users/HomeFolder/Library/Caches/Safari, NSUnderlyingError=0x6180008517c0 "The operation couldn’t be completed. Permission denied"}

My real home folder is HomeFolder1. There is no Safari folder in ~/Library/Cache
Posted By: ganbustein Re: Weird Safari/System issue - 12/13/14 06:08 AM
Note the difference between "Cache" and "Caches".

On my machine there are recently updated folders at:
$(getconf DARWIN_USER_CACHE_DIR)/com.apple.Safari and at ~/Library/Caches/com.apple.Safari.

Safari seems to be using both. (The first of those caches folders is the one that DARWIN announces; the second is the one Cocoa announce (by way of NSFileManager). Where an app should put its cache folder seems to depend on whom it asks.

But notice that Safari ALWAYS identifies itself as "com.apple.Safari". It NEVER calls itself just plain old "Safari". I have neither ~/Library/Cache nor ~/Library/Caches/Safari on my machine.

I wonder if the application generating this error is not really Safari, but rather some impersonator. When you get the error, check the PID (65665 in your example message) to see if it's really Safari generating the error.

What is your username? If your username is still "HomeFolder", poorly written code may be stumbling on your system by expanding the path "/Users/$USER/Library/Caches/Safari", thinking that /Users/$USER is the same as $HOME. They're both incorrect, though. The right thing to do is to ask NSFileManager for the path to the NSCachesDirectory in the local domain (which will on Yosemite give it a file URL to ~/Library/Caches) and append 'Safari' as a path component to that. (Actually, for a sandboxed app, the NSCachesDirectory points into the app's sandbox at a place where there is a symlink to ~/Library/Caches. You get to the same place, but you get there with Gatekeeper's blessing.)
Posted By: Douglas Re: Weird Safari/System issue - 12/13/14 04:07 PM
No HomeFolder is not the actual name, I just substituted that to post here.

OK, nothing open but finder. I open Console. I open Safari and put in a website.

That error message pops up on Console. Did this 3 times as a test and every time I open Safari put in any website, this error comes up in Console.
Posted By: ganbustein Re: Weird Safari/System issue - 12/13/14 05:38 PM
Originally Posted By: Douglas
No HomeFolder is not the actual name, I just substituted that to post here.

But you said you were posting the exact error message! That's tantamount to a promise that we don't need to worry about typos, because you've copy/pasted without editing. If you've altered the text of the error message in any way, that's something we need to know about. Hide your username if you want, but tell us you've hidden it. I already see that you confused "Cache" with "Caches" in at least one place, and I don't know if that was a typo or an actual error. Where there may be one typo, there may be others.

But the gist of my question was: Is your home folder NOT /Users/$USER? That is, is it the case that, for example, your username ($USER) is "douglas" but your home folder is "/Users/douglas1" or even "/Volumes/big disk/home/douglas1"? It's perfectly OK to do something like that; it's definitely wrong for any app to fail to take that in stride. But we need to know, and you need to tell us, exactly what the situation is. Otherwise, we're spinning our wheels trying to guess what's really going on. All we know is that something is wrong, and guesses we make based on the assumption that nothing is out of the ordinary are likely to be incorrect. You need to tell us, exactly, what's out of the ordinary on your system.

Originally Posted By: Douglas
OK, nothing open but finder. I open Console. I open Safari and put in a website.

That error message pops up on Console. Did this 3 times as a test and every time I open Safari put in any website, this error comes up in Console.

Yes, yes, but: does the PID in the error message match the PID of Safari. (Look in Activity Monitor to see.)

If the message comes up immediately in Safari, it's probably coming from a (poorly written) Safari plugin. Try disabling plugins until the error goes away, and then send a nasty helpful note to the developer of the plugin. (By "plugin" I of course mean "extension". I wish they wouldn't keep changing terminology on us.)
Posted By: Douglas Re: Weird Safari/System issue - 12/13/14 09:07 PM
Ok, this is the EXACT message in Console, not changes or substitutions whatsoever.

12/13/14 2:03:01.686 PM Safari[87325]: could not create "/Users/douglasholley/Library/Caches/Safari", error Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “Safari” in the folder “Caches”." UserInfo=0x60800026aa00 {NSFilePath=/Users/douglasholley/Library/Caches/Safari, NSUnderlyingError=0x60800024a7d0 "The operation couldn’t be completed. Permission denied"}

According to Activity Monitor 87325 is associated with Safari. Starting with my HD and opening the Users folder my home folder is named 'douglasholley1'.
Posted By: joemikeb Re: Weird Safari/System issue - 12/13/14 10:07 PM
Gangbustein is correct when he says, Safari ALWAYS identifies itself as "com.apple.Safari". As he has already suggested try in Safari > Preferences > Extensions turn third party extensions OFF. Then restart Safari and see if the error message still shows up, If it does then the error is being generated by an improperly coded third party extensions.

Sometimes in order to do their job, third party extensions will cause error messages to be thrown.
Posted By: Douglas Re: Weird Safari/System issue - 12/13/14 10:11 PM
The above Console message is AFTER I turned off all extensions, closed and reopened Safari.
Posted By: dkmarsh Re: Weird Safari/System issue - 12/13/14 11:57 PM

Quote:
But notice that Safari ALWAYS identifies itself as "com.apple.Safari". It NEVER calls itself just plain old "Safari".

It used to, though. Reviewing my various old boot volume sparseimages, I find that through OS X 10.4, the relevant files were maintained in ~/Library/Caches/Safari/.

I have no useful theory as to the relevance this fact may have to Douglas's problem, but there it is...
Posted By: ganbustein Re: Weird Safari/System issue - 12/14/14 08:35 PM
Originally Posted By: Douglas
According to Activity Monitor 87325 is associated with Safari. Starting with my HD and opening the Users folder my home folder is named 'douglasholley1'.

Remember that we were looking for an imposter, a process going by the name "SafarI" even though it is't the web browser of that name. (You can start a process with any name you want. The name needn't have any resemblance to the file the process is running.) So the question wasn't "does process #87325 have the name 'Safari'?". The question was "is your Safari browser running as process #87325?". Sort by name and see if you have multiple processes named Safari. Or select the process in Activity Monitor, Get Info, and switch to the "Open Files and Ports" tab. Verify that the second line says "/Applications/Safari.app/Contents/MacOS/Safari".

You are running the copy of Safari that's at /Applications/Safari.app, right? Version 8.0.x? Not some Safari from another disk, maybe one intended for a different version of the OS?


But it doesn't seem to be plugin. What else might it be?

I looked through Safari's preferences looking for a folder you might have asked it to create. The only possibility I see is in Safari→Preferences→Save downloaded files to:[folder]. The default value is Downloads, which Safari records in its preferences as "~/Downloads". But you could have set it to anything, including "/Users/douglasholley/Library/Caches/Safari". Never mind. I tried this in my guest account. If Safari cannot open the folder you've told it to put downloads in, it silently changes the setting back to ~/Downloads. There is no error message in Console.

All the other Safari preferences seem to be regarding things Safari might look for (CSS files and such), but wouldn't create a folder for.

Since Safari is obviously not getting this path from the system, it must have it stored somewhere, probably in its preferences. See what you get from the Terminal command
defaults read com.apple.Safari | grep Library

The only hit I get for that is WebIconDatabaseImportDirectoryDefaultsKey = "~/Library/Safari/Icons";.

You might as well also try defaults read com.apple.Safari | grep douglasholley.

Another place to look is any macro utilities you have, such as Keyboard Maestro or QuicKeys. They can usually be configured to trigger a specific action whenever a specific application launches. You might have triggered something to do whenever Safari runs.

Do you have any anti-virus software installed? It might think the launch of Safari was an interesting event. Or that Safari's caches (or wherever it thinks Safari's caches live) are an interesting place to explore.
Posted By: Douglas Re: Weird Safari/System issue - 12/15/14 12:50 AM
Looking at Activity Monitor, all processes, there are only 3 items with Safari in the name: Safari, Safari Web Content and Safari Networking. Safari is the only one with the PID 87325.

I am using Mavericks, 10.9.5 and Safari 7.1.2 on my internal HD, no other Safari anywhere on system.

highlighted Safari in Activity Monitor, Open Files and Ports tab and that shows /Applications/Safari.app/Contents/MacOS/Safari".
Posted By: ganbustein Re: Weird Safari/System issue - 12/15/14 05:28 AM
OK, I'm officially stumped. I even went so far as to create a new user on my computer (running Yosemite), change that user's home folder, then log in and start browsing with Safari. No messages in Console. No unusual behavior in Safari.

There's something very strange on your computer. Think over all the things you've done to customize it. Especially think about add-ons you don't really use and have forgotten about. (The ones you do use might be equally to blame, but you'll think about them anyway.) Look in System Preferences→Users & Groups→Login Items for hints.

Why did you rename your home folder? How did you rename it? (There are several methods; which one did you use? If through a Terminal command, which one? Be explicit.) Renaming your home folder should be OK, but you do have to admit it's out of the ordinary. Was there anything else you did at around that time?
Posted By: Douglas Re: Weird Safari/System issue - 12/15/14 05:48 AM
I have NOT changed my home folder name. It's the same one I used when I set up the Mini when I got it in July and migrated things over from my previous Mini which was running 10.6.8.

Nothing unusual in my log in items that I can see.
Posted By: dkmarsh Re: Weird Safari/System issue - 12/15/14 02:11 PM

The home folder naming issue is unclear to me, too. Did you take your old mini's home folder name and append a 1 to it when you created your username on your new mini?

In your initial post, you said

Quote:
Then I noticed that my home folder is "myhomefolder1".

which implied (to me, anyway) that that wasn't the name you expected.
Posted By: Douglas Re: Weird Safari/System issue - 12/15/14 03:08 PM
Yes, when I got my new Mini in July and migrated everything from my old Mini I did just append a "1" to the New Mini home folder.
Posted By: dkmarsh Re: Weird Safari/System issue - 12/15/14 05:43 PM

If Douglas's previous mini came with OS X 10.3 or 10.4 installed originally, there would have been a ~/Library/Caches/Safari folder on it, as I noted above. If that folder survived subsequent upgrades to 10.6—an hypothesis which I can't test, because I've always done clean installs of OS upgrades and migrated data piecemeal as needed—then it would still have existed just prior to the switch to a new mini. So if some hypothetical bit of software were referencing ~/Library/Caches/Safari, no error message would be forthcoming, since that folder would in fact exist.

On the new mini, the hypothetical bit of software would be looking for a non-existent folder, in a non-existent user domain, and would generate an error message.

I have no idea what hypothetical bit of software could appear to be part of current Safari while looking for a cache location set by an eight-year-old version of Safari; it just seems to me that this set of conditions would produce the reported symptoms.
Posted By: Douglas Re: Weird Safari/System issue - 12/15/14 06:21 PM
I think that Safari is looking in the wrong place. It's looking in douglasholley, which does not exist, and my home folder is douglasholley1.

My old mini, late 2009, was running SL 10.6.8 when I migrated over to the new Mini in July. Currently running 10.9.5.
Posted By: ganbustein Re: Weird Safari/System issue - 12/15/14 09:36 PM
So I think what happened is: when you set up the new mini, you first answered all the questions the Setup Assistant asked you, including your name (by which it meant "the name of the new user I'm helping you set up") and you gave it Douglas Holley. Following its standard procedure, it shortened that to "douglasholley" for the username of the new user, and created "/Users/douglasholley" to be the new user's home folder. But the new home folder did not have any of your data in it.

To get your data, you ran Migration Assistant, which copied over all the users (I'm guessing all one of them) and their home folders from the old mini, but when it came to user "douglasholley" it saw you already had a user with that name on the new mini. It changed the name to "douglasholley1" and copied the home folder as /Users/douglasholley1.

(Tip for next time: When setting up a new computer, if you intend to migrate any user data from an old computer, do that first. When Setup Assistant asks for your name, ignore it and look for the option to use Migration Assistant instead. Then you don't get this weird user duplication.)

At some point you noticed the now useless /Users/douglasholley, and deleted it.

Go into System Preferences→Users & Groups to see a list of all your users. At the top of the list is the Current User, which will be douglasholley1, but that's not the name you'll see. Every user has a full name (like "Douglas Holley", possibly with spaces and upper case letters and maybe even other punctuation) and a separate usersname (like "douglasholley1", typically containing only lowercase letters and digits and maybe underscores, but no spaces or other punctuation). The name you'll see for the current user is your full name, which I would imagine is "Douglas Holley 1", but I'm not sure about the trailing 1.

You may or may not see another Douglas Holley user. If, when you deleted the /Users/douglasholley folder, you did it by just dragging it to the trash, the user would have been left behind, and you'll still see it in the list.

In the bottom left corner of the window is a padlock. If the padlock is closed, click on it, and enter your password when requested to unlock it.

Right-click (or control-click) on your current user, and you'll see a contextual menu with only one option: "Advanced Options...". Select that from the menu, and a sheet will slide down with additional information, including your username ("douglasholley1", inexplicably labeled "Account name") and the path to your home directory ("/Users/douglasholley1"). Don't change anything on this sheet without direction from us. For now, just look, and then press "Cancel".

I mentioned before that there are several ways to change the name of your home folder. Changing it here on this sheet is one of them, but you'll lock yourself out of the computer if you change your own home folder. You have to do it from another account, and also use that other account to rename the actual folder. Just so you'll know, for future reference.

If you see another "Douglas Holley" user on the list, you should probably delete it. You've already deleted its home folder, so it's doing you no good. That might be the source of your problems. Select the other account, and click on the [—] button below the list. Feel free to examine its "Advanced Options..." before deleting it.

One item you may have noticed on the "Advanced Options..." sheet is an item called User ID. This number is the number that actually identifies the user. All the other identifications (Full Name, username aka Account Name, etc.) ultimately resolve to this number. All of "your" files are owned by this number. (That's the definition of "your".)

Each regular user is assigned at creation the smallest unused userid greater than 500. That means the first user on your computer ("douglasholley") was assigned userid 501, and the second user ("douglasholley1") was assigned userid 502. Notice that files on your old mini were owned by userid 501, so they aren't "your" files. Migration assistant translated owner=501 to owner=502 for every file it copied, so you own those files, as you should. If you have an external disk with files from the old mini and try to read it on the new mini, there will be a mismatch of owners. The files will be owned by the user that put them on the disk (501). To be able to read them on the new mini, where you are user 502, you'll have to "Ignore ownership" on the disk. "Ignoring ownership" means you are considered the owner of everything on the disk no matter what userid it claims to be owned by. Fortunately, that's the default for most external disks.

The reason I mention this is that it's remotely possible that Safari is seeing a file with owner=501, looking up the user with that number, and finding the user you did not delete whose home folder is /Users/douglasholley. Deleting the user will prevent Safari from doing that.


Here's another thought... Safari will try to use ~/Library/Caches/com.apple.Safari for (some of) its caching. Take a look at that. Is it perhaps an alias pointing elsewhere? Safari would try to create a folder wherever it points. Also check if ~/Library/Caches is an alias. If either of these is an alias, delete the alias and let Safari create a folder in its place.
Posted By: Douglas Re: Weird Safari/System issue - 12/15/14 10:31 PM
First, looking at Users & Groups there are only 2 listing: Douglas Holley 1 and Guest. That is all. If I start with my HD and go to the Users Folder there are 3 items: douglasholley1, Guest and Shared.

If I right click and select 'Advanced Options' it shows Account Name as douglasholley1 (with no other choices) and Home Directory /Users/douglasholley1
Posted By: joemikeb Re: Weird Safari/System issue - 12/16/14 03:13 AM
Originally Posted By: douglas
First, looking at Users & Groups there are only 2 listing: Douglas Holley 1 and Guest. That is all. If I start with my HD and go to the Users Folder there are 3 items: douglasholley1, Guest and Shared.

If I right click and select 'Advanced Options' it shows Account Name as douglasholley1 (with no other choices) and Home Directory /Users/douglasholley1

That is what you should see. What you should NOT see is the error message referencing an out of date or non-existent folder for cache files. If you transferred your files as a part of the normal setup process, you would have been prompted to do that BEFORE you created an account on the new mini and your home folder and userid would be the same douglasholley as appeared on the old Mac. Did you run Migration Assistant to transfer your files and folders from your old computer after creating the douglasholley1 account or did you use some other method to transfer your files?

You have pretty well eliminated extensions as a source of the error messages but just in case, have you checked to see if all of the Safari extensions are current? You can do that by going to Safari → Preferences → Extensions and clicking on the Updates button at the bottom of that window. If you find extensions that are no longer supported then you can and should delete them in that same Safari Preference Pane.

There is no quick way to check plug-ins for being current, but go to ~/Library/Internet Plug-Ins and /Library/Internet Plug-Ins and check the dates on each of the files you find there. Most should have a creation date of 2013 or 2014 but any older than that may be suspect. Certainly any that are dated 2009 or before should be removed and replaced with the latest updated versions. If you cannot find ~/Library (it is by default invisible in Mavericks and Yosemite) then press ⇧⌘G and enter ~/Library (be sure and include the tilde (~)) and that will take you there.
Posted By: Douglas Re: Weird Safari/System issue - 12/16/14 05:59 AM
Yes, I used Migration Assistant to go from my old Mini to the new one. I don't recall the exact step by step but I printed out some information from MacWorld web site and followed it as far as I can remember.

All extensions up today and get the same message if all extensions are turned off.

All Internet Plug-ins are dated 2014.

Would deleting Safari and all associated files, restarting my Mini and downloading a new copy of Safari possibly correct this? Hadn't thought of this until this evening.
Posted By: artie505 Re: Weird Safari/System issue - 12/16/14 06:32 AM
I doubt that you could delete Safari, itself, without an uninstaller, and as far as I know, none exists, but deleting its "support" files, restarting, and installing a new version of Safari over your old one would be a useful exercise. (ganbustein has shot down the venerable troubleshooting step of trashing plists, though, so I'm not certain that simply deleting yours will be effective.)

But it may make a confounding issue go away and deprive all present of the joy of head-scratching. frown tongue
Posted By: artie505 Re: Weird Safari/System issue - 12/16/14 07:38 AM
I just reread your error message, and it dawned on me that repairing your home folder permissions (Edit: and seeing how things work out) before you reinstall Safari would be a good idea.

Snowy works differently than Mounty, so I'm not 100% certain of this, but I think you've got to boot into your restore partition, locate Utilities > Reset Password, and click at the bottom of that pane to repair your home folder permissions.
Posted By: grelber Re: Weird Safari/System issue - 12/16/14 08:20 AM
Given all the do-si-doing that's been going on, might it not be thought to just "retiring" Safari and using a different browser (such as Firefox)? It would certainly resolve the frustration with this issue.
Posted By: artie505 Re: Weird Safari/System issue - 12/16/14 08:24 AM
You never give up, do you? wink

Naaah!!! Especially not when there's maybe still something to be learned.
Posted By: dkmarsh Re: Weird Safari/System issue - 12/16/14 11:35 AM

Originally Posted By: artie505
I doubt that you could delete Safari, itself, without an uninstaller, and as far as I know, none exists, but deleting its "support" files, restarting, and installing a new version of Safari over your old one would be a useful exercise.

There's no standalone version of Safari that can be installed over an existing one in Mavericks. See How to install Safari 7.
Posted By: artie505 Re: Weird Safari/System issue - 12/16/14 11:47 AM
Thanks for the link.

Isn't reinstalling OS X (A clean install?) a bit of an extreme measure when all you want is to reinstall Safari? (I imagine, though, that Pacifist could extract it from a user-created installer and install it.)
Posted By: joemikeb Re: Weird Safari/System issue - 12/16/14 03:47 PM
Originally Posted By: Douglas
Yes, I used Migration Assistant to go from my old Mini to the new one. I don't recall the exact step by step but I printed out some information from MacWorld web site and followed it as far as I can remember.

All extensions up today and get the same message if all extensions are turned off.

All Internet Plug-ins are dated 2014.

Would deleting Safari and all associated files, restarting my Mini and downloading a new copy of Safari possibly correct this? Hadn't thought of this until this evening.

I don't thing Safari is any longer available as a separate download. You best bet would be to boot from the Recovery drive (Boot while holding ⌘R) then reinstall OS X. Whether that will cure your problem or not is unknown, but it cannot hurt. Mavericks is already out of date so it would not be amiss to go to the App Store and download and install Yosemite as long as you are doing a reinstallation. The upgrade is free.
Posted By: grelber Re: Weird Safari/System issue - 12/16/14 07:36 PM
Originally Posted By: artie505
You never give up, do you? wink

Nope.

Originally Posted By: artie505
Especially not when there's maybe still something to be learned.

When even the wizards of the Mac are stumped, perhaps it's time to move on. tongue
Douglas's Safari is well and truly fratzed and probably should be given a decent burial. cool
Besides, who wants to spend Christmas crawling around in the bowels of the system? crazy
Run! Run like the wind! wink
Posted By: ganbustein Re: Weird Safari/System issue - 12/16/14 08:02 PM
Originally Posted By: Douglas
First, looking at Users & Groups there are only 2 listing: Douglas Holley 1 and Guest. That is all. If I start with my HD and go to the Users Folder there are 3 items: douglasholley1, Guest and Shared.

OK, good. That means that when you deleted douglasholley, you deleted the actual account (in Users & Groups), and not just the account's home folder.

Not related to your problem, but you should not be seeing /Users/Guest. The guest account works differently under Lion and later than it did in Snow Leopard and earlier. /Users/Guest will be created when you log in as Guest, and deleted when Guest logs out. No matter. Log in once as Guest and immediately log out, and /Users/Guest will be gone, as it should be.

Originally Posted By: Douglas
If I right click and select 'Advanced Options' it shows Account Name as douglasholley1 (with no other choices) and Home Directory /Users/douglasholley1

There wouldn't be any choices. It's a text field. You'd change it by typing a new value. BUT DON'T DO THAT! If you want to change your username from douglasholley1 back to douglasholley, we can walk you through that, but let's first figure out your problem.

You haven't told me what happens when you check for an alias file pointing to /Users/douglasholley/Library/something. Try this:

In Finder, select your home folder (/Users/douglasholley1, or use Go→Home (⌘⇧H)), then type ⌘F to open a Find window. When the Find window opens, you'll see a line that says Search: [This Mac] ["douglasholley1"], with the latter button highlighted. (If the button isn't there, you weren't looking at your home folder when you entered ⌘F. Close the window and try again. If it's there but not highlighted, click on it to highlight it.)

The line below that says [Kind] is [Any]. Pull down the [Any] menu and select "Other". In the text field that appears, enter alias.

You should now have a list of all the alias files in your home folder. Well, most of them, anyway. We're especially interested in aliases in your ~/Library folder, which would qualify them as "system files". To add "system files" to the list, click on the [+] button at the end of the [Kind] is [Other] alias line. In the new line that appears, change the first menu to [System files]. (If "System files" isn't on the menu, select "Other" and scroll through the list that appears until you find "System files" and click on that.) Change the second item on that line so that the whole line now reads [System files] [are included].

Hopefully there still won't be many. See if any are relevant. (Examples of relevant aliases would be aliases that have "cache" or "safari" or "downloads" anywhere in their name.)
Posted By: ganbustein Re: Weird Safari/System issue - 12/16/14 08:44 PM
Applications don't rot on disk. Uninstalling and reinstalling Safari (or any other application) would be a lot of useless work.

Before OS X, applications were resource files that modified themselves as they ran, and it was not unusual for an application to corrupt itself. Those days are long past.

If your permissions are set right (and they are for anything installed by Apple), you couldn't modify an application even if you tried. If Safari did somehow get altered on disk, it would no longer pass its signature check, and the OS would refuse to run it.

Don't waste time thinking of ways to reinstall Safari. The app is fine.


The reference to /Users/douglasholley has to be coming from somewhere. I suggested earlier:

Originally Posted By: ganbustein
See what you get from the Terminal command
defaults read com.apple.Safari | grep Library

The only hit I get for that is WebIconDatabaseImportDirectoryDefaultsKey = "~/Library/Safari/Icons";.

You might as well also try defaults read com.apple.Safari | grep douglasholley

I'm still waiting to see the output from that. That will tell us if the problem is in Safari's preferences.

IF the problem is in the preferences, we can either correct the problem or delete the preferences. You can no longer (and in truth never could reliably) delete preferences by moving .plist files, but defaults delete com.apple.Safari still works. But I doubt very much it will help, assuming the defaults read com.apple.Safari | grep -i ... tests all come up negative.

I'm currently thinking he had an alias to /Users/douglasholley/Library/Caches/Safari on his old mini, and Migration Assistant dutifully copied it verbatim. Safari is tripping over that alias somehow.

Repairing home permissions won't help. Despite the fact that the error message says "You do not have permission to create...", this isn't really a permissions problem. The problem is that Safari is somehow being directed out into the boondocks. It's true that Safari doesn't have permission to create anything in the boondocks, but that's as it should be and as it will still be after repairing home permissions.

Switching to another browser won't tell us what's going on, and I for one would like to get to the bottom of this. (Besides, I like Safari. It's the only browser I use.)
Posted By: Douglas Re: Weird Safari/System issue - 12/16/14 11:38 PM
I am going to Repair Permissions on my Home Folder in the next couple of day if I can find the time, family and holidays you know, and will report back.

As a side note, after I got my new Mini set up I got busy deleting the language files the applications and I accidentally deleted english from one application and it would not open. I created a partition on my external HD and installed a fresh copy of Mavericks onto that partition. I deleted the damaged application and copied over the fresh copy from my external HD. I still have that copy of Mavericks on my external HD and it has never been booted and has Safari 7.0.5.

What about deleting Safari and associated files/folders from my internal HD, rebooting and then copying the never opened 7.0.5 version over to my internal HD?
Posted By: ganbustein Re: Weird Safari/System issue - 12/17/14 12:36 AM
Originally Posted By: Douglas
I am going to Repair Permissions on my Home Folder in the next couple of day if I can find the time, family and holidays you know, and will report back.

As a side note, after I got my new Mini set up I got busy deleting the language files the applications and I accidentally deleted english from one application and it would not open. I created a partition on my external HD and installed a fresh copy of Mavericks onto that partition. I deleted the damaged application and copied over the fresh copy from my external HD. I still have that copy of Mavericks on my external HD and it has never been booted and has Safari 7.0.5.

What about deleting Safari and associated files/folders from my internal HD, rebooting and then copying the never opened 7.0.5 version over to my internal HD?

Knock yourself out, but I doubt it will help. Nothing in your current problem indicates anything wrong with either Safari.app or with home folder permissions. You do get an error message saying you do not have permissions to create /Users/douglasholley/Library/Caches/Safari, but that's as it should be. You should not have permission to create that, and still won't after repairing home folder permissions.

By default, any files (including application) that you copy will end up owned by you. Apple's applications should be owned by root. After the copy, you'll probably have to fix up the permissions. (Use Disk Utility to Repair Permissions. Usually that's a waste of time, but if you specifically and intentionally mess up permissions, you need to specifically and intentionally repair them. You'll get a slew of bogus error messages, which you should ignore.)

"Safari and related files" is a lot more than you might imagine. Safari uses a system called Webkit to actually render web content, and "installing Safari" is mostly about installing Webkit, none of which is actually inside the Safari app. Webkit is used all over the place. Help pages, for example, are displayed using Webkit. The App Store uses Webkit. iTunes uses Webkit. (That's why, for example, it is not possible to "roll back" to an older version of Safari. You'd have to also roll back to a prior version of Webkit, which would break a lot of apps.)

I do not recommend fixing a broken system by copying files around. Unless you really know what you're doing, there's too much risk of borking things up. Copying individual apps can probably be done safely (as long as you fix permissions afterward, which I would do with sudo chown -R root:wheel /Applications/theApplication.app), but Safari is not an "individual app" and cannot be reinstalled so easily. The surest way to reinstall pieces of the OS is to run the Combo updater or re-run the installer. (If you've installed updates since you installed, you will need to re-download the installer to get one for the latest version.)


If you want to satisfy yourself that Safari is installed correctly, go into System Preferences→Users & Groups and create a new user. Log in as that user, give Safari a spin, and see how it goes.

And then satisfy my curiosity by checking out the things I've asked you to check out.
Posted By: Douglas Re: Weird Safari/System issue - 12/17/14 05:36 PM
For the first terminal command I get the following:

CacheDirectory = "/Users/douglasholley/Library/Caches/Safari"

For the second terminal command I get:

"AppleNavServices:PutFile:0:Path" = "file://localhost/Users/douglasholley/Movies/";
"file://localhost/Users/douglasholley/Movies/"
CacheDirectory = "/Users/douglasholley/Library/Caches/Safari";
Douglas-Holley:~ douglasholley1$
Posted By: ganbustein Re: Weird Safari/System issue - 12/17/14 06:34 PM
Originally Posted By: Douglas
CacheDirectory = "/Users/douglasholley/Library/Caches/Safari"

Aha! We've found it!

Quit Safari, and enter the Terminal command

defaults delete com.apple.Safari CacheDirectory

When you start up Safari again, your problem should be gone.

Added note: the two references to /Users/douglasholley/Movies are Safari remembering that the last time you saved a file that's where you saved it. That's just so next time you save a file Safari can suggest saving it in the same place. But it will be just a suggestion, and Safari won't mind that the folder is no longer there.
Posted By: Douglas Re: Weird Safari/System issue - 12/17/14 09:25 PM
Applied your Terminal command and it worked like a charm, no more Console messages showing for Safari now.

My sincere THANKS and I hope that Santa beings you something special.

Also, my sincere thanks to everyone who helped in solving this issue and wishing everyone a wonderful holiday season.
Posted By: ryck Re: Weird Safari/System issue - 12/18/14 08:38 AM
Originally Posted By: ganbustein
Aha! We've found it!

Well done.
© FineTunedMac