p4 sync ...
Protected namespace ... access denied
Found out through debugging that this error was not being generated due to a problem with the permissions on the local directory but rather because the clientspec was incorrectly pointing to a non-existing path on the repository. You are trying to access some part of the repo that is not setup or you dont have permissions to access. Run p4 client and fix the clientspec, and things should work.
Fix the client spec and things work.