chmod: invalid mode: `+a'
"+a" is not a standard argument, no. Follow the next step in the linked documentation.
sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
Info on what the "+a" does for chmods that use it:
+a The +a mode parses a new ACL entry from the next argument on the commandline and inserts it into the canonical location in the ACL. If the supplied entry refers to an identity already listed, the two entries are combined.
That is Mac OS X syntax. See here for proof.
Ubuntu's chmod doesn't include this option.