rather than doing chmod -R 777 mame4all-pi you would be better off chown -R pi:pi mame4all-pi (more secure, and there is no reason to set a+rwx for dirs and files). Latest retropie setup script also does this.
I could use a little extra help with the original issue in this thread. I can not get controller settings that I create (using tab to adjust in-game). Though I am a total n00b at this stuff, I have figured out enough to get myself out to the prompt, look through directories etc, and of course I’ve tried inputting BOTH of the lines of code suggested above. (Such as: sudo chmod -R 777 mame4all-pi) They do seem to “take” when I do this, meaning, I don’t get an error when I input them and hit enter. But when I reboot and go to Mame, I still have the same issue. I can configure my controller within Mame and that works fine, but as soon as I exit out of the game, those settings are gone. I’m baffled and frustrated. Any help would be greatly appreciated. (I just want to be able to insert coins and start up a game without having to plug in a USB keyboard every time!)