我有在Ubuntu 13.04改變上的PostgreSQL 9.1數據目錄的一個問題:如何更改數據目錄在PostgreSQL在Ubuntu 13.04
我第一次做了一次:試圖
sudo pg_dropcluster --stop 9.1 main
,然後創建所需的路徑一個新問題:
sudo pg_createcluster -d /home/fccoelho/Documentos/databases/postgresqldata 9.1 main
,但我失敗,拒絕權限:
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
我應該提到我檢查了權限,嘗試手動創建目錄,然後「向用戶postgres」chowning「等等。沒有任何更改權限被拒絕的消息。
我也試着使用PostgreSQL的分佈沒有成功initdb的二進制
如何使這項工作?
這不僅僅是目標目錄。爲了遍歷路徑,路徑上的任何目錄都必須爲「其他」設置「x」位(除非它屬於postgres)。你檢查過了嗎? –
謝謝,請參閱下面的解決方法。它可能與x位有關,但我沒有檢查。 – fccoelho