Permissions / ownership of directories between / and defaultdb can be fixed. I think PostgreSQL may be sensitive to owning them, although it seems that in your case, PostgreSQL simply does not have access to them. This is what I have for each directory.
$ ls -hlt /opt/local/var/db/ total 0 drwxr-xr-x 7 root admin 238B Jan 23 16:54 texmf drwxr-xr-x 3 root admin 102B Dec 25 07:37 postgresql94
You can fix permissions by running sudo chmod a+rx /opt/local/var/db/ as needed.
For the defaultdb directory defaultdb you should follow the instructions you link to, which seem to have the same as mine:
sudo chown postgres:postgres /opt/local/var/db/postgresql93/defaultdb
Below are instructions adapted from my blog (although I recommend using PostgreSQL 9.4, which I am currently doing). I am running PostgreSQL using MacPorts with 9.1 without major problems.
1. Install PostgreSQL using MacPorts.
Of course, I assume that you have MacPorts on your system.
sudo port install postgresql93 +perl +python27 sudo port install postgresql93-server
2. PostgreSQL setup
First I need to initialize the database cluster and then start the server. The following screen instructions are provided with the MacPorts postgresql93-server port.
sudo mkdir -p /opt/local/var/db/postgresql93/defaultdb sudo chown postgres:postgres /opt/local/var/db/postgresql93/defaultdb sudo su postgres -c '/opt/local/lib/postgresql93/bin/initdb -D /opt/local/var/db/postgresql93/defaultdb'
Note that MacPorts creates a startup daemon. To download it now and make sure that it starts at system startup, follow these steps:
sudo defaults write /Library/LaunchDaemons/org.macports.postgresql93-server.plist Disabled -bool false sudo launchctl load /Library/LaunchDaemons/org.macports.postgresql93-server.plist
Then I use psql for some tuning to get my database.
sudo su - postgres /opt/local/lib/postgresql93/bin/psql -U postgres -d template1
If you get here, then PostgreSQL will work on your system.