[英]postgres 9.3 moving data directory on ubuntu 14
after using 使用后
sudo chown -R ubuntu:ubuntu /data/psql
/usr/lib/postgresql/9.3/bin/initdb -D /database
and changed the data_directory = '/var/lib/postgresql/9.3/main'
to /data/psql'
并将data_directory = '/var/lib/postgresql/9.3/main'
/data/psql'
data_directory = '/var/lib/postgresql/9.3/main'
/data/psql'
data_directory = '/var/lib/postgresql/9.3/main'
/data/psql'
data_directory = '/var/lib/postgresql/9.3/main'
/data/psql'
data_directory = '/var/lib/postgresql/9.3/main'
/data/psql'
data_directory = '/var/lib/postgresql/9.3/main'
更改为/data/psql'
on starting the a rails app the nginx log is showing: 在启动a rails应用程序时,nginx日志显示:
Error during failsafe response: FATAL: could not open relation mapping file "global/pg_filenode.map": Permission denied 故障安全响应期间出错:致命:无法打开关系映射文件“ global / pg_filenode.map”:权限被拒绝
someone have a hint about how to give the permission to the app? 有人对如何向应用程序授予权限有提示吗?
thank's 谢谢
It's generally recommendable that the PostgreSQL user own not just the data directory but its parent directory as well, so that this should not be a problem. 通常建议PostgreSQL用户不仅拥有数据目录,还拥有其父目录 ,因此这不成问题。
so changing permission back to postgres would be your solution: 因此将权限改回postgres将是您的解决方案:
sudo chown -R postgres:postgres /data/psql
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.