If you are not working with git, don’t mind about .gitignore. If the folders exists everything’s fine.
As long as you’re on your local machine, there shouldn’t be a problem with the Apache user either.
Under “Get Info” you have 3 dropdowns. At least the first one should be “Read & write” (don’t know the exactly wording in English because my system runs in German). If that is not enough for the mentioned folders, try to set the second one to “Read & write”, too.