Mostly fixed some permission issues.

Finaly got this thing working.