Hyperledger fabric 安装Hyperledger资源管理器时运行文件createdb.sh时出错
当我运行createdb.sh文件时,出现了一个错误:\Hyperledger fabric 安装Hyperledger资源管理器时运行文件createdb.sh时出错,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,当我运行createdb.sh文件时,出现了一个错误:\ could not change directory to "/root/gopath/src/github.com/hyperledger/fabric/fabric-samples/blockchain-explorer/app/persistence/fabric/postgreSQL/db": Permission denied psql: error: ./explorerpg.sql: No such fi
could not change directory to "/root/gopath/src/github.com/hyperledger/fabric/fabric-samples/blockchain-explorer/app/persistence/fabric/postgreSQL/db": Permission denied
psql: error: ./explorerpg.sql: No such file or directory
could not change directory to "/root/gopath/src/github.com/hyperledger/fabric/fabric-samples/blockchain-explorer/app/persistence/fabric/postgreSQL/db": Permission denied
psql: error: ./updatepg.sql: No such file or directory</code>
我按照书中的说明去做
我已经完成了所有步骤,并向db申请了权限/
有一个文件create.sh
和文件夹数据库
使用sudo-u选项,您可以作为postgres用户运行命令
预计postgres用户将无权访问/root目录。
这里有三个解决方案 1.更改文件模式bits/root dir
- 不推荐
- 在根目录下运行应用程序是危险的,并且与Linux用户理念相矛盾
你能确切地告诉我以代码形式使用的命令吗?@myeongkilkim command sudo-u postgres./createdb.sh在运行命令chmod-R 775 db/@myeongkilkim后非常感谢你
# this is your command
sudo -u postgres ~~
sudo
-u, --user=user run command (or edit file) as specified user name
or ID
sudo chmod -R 775 /root
# ubuntu 18.04
sudo usermod -aG sudo postgres
su - postgres
# centos7
sudo usermod -aG wheel postgres
su - postgres