I am having a problem changing the data directory on postgresql 9.1 on ubuntu 13.04:
I first did a:
sudo pg_dropcluster --stop 9.1 main
and then attempted to create a new one in the desired path:
sudo pg_createcluster -d /home/fccoelho/Documentos/databases/postgresqldata 9.1 main
but i fails with a permission denied:
Creating new cluster (configuration: /etc/postgresql/9.1/main, data: /home/fccoelho/Documentos/databases/postgresqldata/)...
initdb: could not access directory "/home/fccoelho/Documentos/databases/postgresqldata": Permission denied
Error: initdb failed
How do I make this work?