There are other questions regarding this but they had other problems like wrong commands, so here goes:
I gave a command block the command
execute @a ~0 ~0 ~0 fill ~-30 ~-30 ~-30 ~30 ~30 ~30 minecraft:diamond_block 0 replace minecraft:gold_block
This should replace all gold blocks close to players with diamond blocks (just used them as a quick test that won't affect other things in nature). I was the only person on the server, activated the command block, but it said "Failed to execute [...] on player [me]" (It also doesn't replace the gold block conveniently placed next to me).
Is there anything wrong with the command?