我在try 转储数据库时出现此错误,我输入
linuxuser $ sudo su postgres
linuxuser $ [sudo] password for linuxuser:...
$ pg_dump -h localhost mydb >tempfile
$ sh: cannot create tempfile: Permission denied
怎么了?我刚刚安装了新的postgresql.
我在try 转储数据库时出现此错误,我输入
linuxuser $ sudo su postgres
linuxuser $ [sudo] password for linuxuser:...
$ pg_dump -h localhost mydb >tempfile
$ sh: cannot create tempfile: Permission denied
怎么了?我刚刚安装了新的postgresql.
写入postgres用户具有写入权限的目录.例如/tmp
.
$ pg_dump -h localhost mydb >/tmp/tempfile
在您的try 中,postgres用户try 在属于其他用户的某个随机目录中创建一个文件.