Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 正在安装Postgres自定义类型-无法访问文件“&引用;:拒绝许可_Postgresql_Unix_File Permissions - Fatal编程技术网

Postgresql 正在安装Postgres自定义类型-无法访问文件“&引用;:拒绝许可

Postgresql 正在安装Postgres自定义类型-无法访问文件“&引用;:拒绝许可,postgresql,unix,file-permissions,Postgresql,Unix,File Permissions,使用postgres11,我试图注册源发行版中的示例Complex类型 我构建的类型没有任何问题: git clone https://github.com/postgres/postgres.git cd postgres/src/tutorial make 但当我尝试安装它时,遇到了权限问题: ~/p/s/tutorial> psql -U postgres -W Password: psql (11.2 (Debian 11.2-1.pgdg90+1)) Type "help"

使用postgres11,我试图注册源发行版中的示例
Complex
类型

我构建的类型没有任何问题:

git clone https://github.com/postgres/postgres.git
cd postgres/src/tutorial
make
但当我尝试安装它时,遇到了权限问题:

~/p/s/tutorial> psql -U postgres -W 
Password: 
psql (11.2 (Debian 11.2-1.pgdg90+1))
Type "help" for help.

postgres=# \c testdata
Password for user postgres: 
You are now connected to database "testdata" as user "postgres".
testdata=# 
testdata=# \i complex.sql
psql:complex.sql:39: NOTICE:  type "complex" is not yet defined
DETAIL:  Creating a shell type definition.
psql:complex.sql:39: ERROR:  could not access file "/home/mnuttall/postgres/src/tutorial/complex": Permission denied
psql:complex.sql:47: ERROR:  type complex does not exist
我不确定权限问题的确切来源,因为我已将src/tutorial目录中所有内容的权限更改为777


有人有主意吗?

系统用户似乎无法访问您的主目录
postgres

您需要确保上面目录的权限允许用户
postgres
进入目录(
r-x
)。因此,可能的解决方案是运行:

$chmod o+rx$HOME

如果这没有帮助,请确保在路径中的每个其他目录上也运行该命令。

face palm!谢谢Jakub:)