The exact configuration would depend on your specific server configuration. 777 would be the least restrictive, but some server configurations may allow something different.
As the error states, if you don't know what you're doing in terms of file permissions, you should probably speak to your host or server person. Once that particular error is resolved, it's very likely you may have other file permission related issues.
I believe the error is coming from my add-on installer. I do not (and will not ever) advise people on how to configure their servers so if you still can't get it working you will need to do as the error message says and speak to your host.