Showing .htaccess and other "hidden" files in Mac OS X Finder



Last revision November 8, 2017

Access Control Table of Contents:
  1. Introduction
  2. By SUNet ID
  3. By Computer
  4. By Local Password
  5. By Computer and Password
  6. By Computer or Password

These instructions have been tested on Mac OS X versions 10.5 through 10.12.

You use the Finder in Mac OS X to view web folders served by pangea if you have mounted them on your desktop as network file shares from sesfs.stanford.edu.

A Mac OS X system preference file has a parameter called "AppleShowAllFiles" that determines whether the Finder will show "hidden" files, such as those whose name begins with a dot (.) character, including .htaccess files. By default, this parameter is set to hide such files from view. Each user on a Mac can change this parameter for his own account. It applies to all Finder windows.

There is no graphical interface for changing the AppleShowAllFiles parameter. You must type in commands in the Terminal application. Start by opening Terminal. It is normally found in the Utilities subfolder of the Applications folder.

Type this line exactly as shown (hint: cut and paste it from here to your Terminal window). Press the RETURN key when done:

defaults write com.apple.finder AppleShowAllFiles TRUE

That command should run immediately and give you a new prompt. Now, type this next line exactly as shown and press the RETURN key:

killall Finder

This will restart the Finder with the new value of the AppleShowAllFiles parameter.

You can tell right away that this worked by opening your hard disk in the Finder. You should now see lots of files you never saw before, including ones whose names start with dot characters, such as .DS_Store and .Trashes.

Do not try to "clean up" these hidden files! They are essential to your system operation. That is why they are normally hidden!

Now you can actually see those .htaccess files that you create in your personal web folder that is mounted from the sesfs.stanford.edu file server.

If you no longer need to see hidden files, you can restore the normal behavior of the finder by typing two more commands in the Terminal application. Type these two lines exactly as shown, pressing the RETURN key at the end of each line:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

Comments or Questions?