Error: Error building site: Error(s) rendering pages: failed to /path/to/public/index.xml and public/tags/index.xml

Hello guys:

Has anyone else experienced this kind of error?

the:

  Error: Error building site: Error(s) rendering pages: public/folder/index.xml 

hugo server -t < theme> <–buildDrafts>

worked without an issue though.

After ls -l the public folder, I found permissions for the index.xml had changed to root

The only way I was able to get around this problem was to

 chown -R group:owner <index.xml> 

directly on the public folder.

Thanks