Error while trying to create dir if missing mkdir var hyperledger permission denied

0 votes

I'm following this guide https://github.com/ITPeople-Blockchain/auction after the make native command, I execute the next command ./orderer but I received the following error:

enter code herepanic: Error while trying to create dir if missing: mkdir /var/hyperledger: permission denied

Shell log:

2017-07-06 14:50:11.556 CEST [orderer/main] main -> INFO 001 Starting orderer: Version: 1.0.0-rc2-snapshot-a0afe19a Go version: go1.8.3 OS/Arch: linux/amd64 panic: Error while trying to create dir if missing: mkdir /var/hyperledger: permission denied

goroutine 1 [running]: github.com/hyperledger/fabric/common/ledger/util/leveldbhelper.(*DB).Open(0xc42034b480) /home/user/work/src/github.com/hyperledger/fabric/common/ledger/util/leveldbhelper/leveldb_helper.go:84 +0x315 github.com/hyperledger/fabric/common/ledger/util/leveldbhelper.NewProvider(0xc4203583c0, 0xc4203583c0) /home/user/work/src/github.com/hyperledger/fabric/common/ledger/util/leveldbhelper/leveldb_provider.go:40 +0x11b github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.NewProvider(0xc420355da0, 0xc420355dc0, 0xc4203583a0, 0xc420167c50) /home/user/work/src/github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage/fs_blockstore_provider.go:34 +0x85 github.com/hyperledger/fabric/orderer/ledger/file.New(0xc4201ee480, 0x23, 0x2, 0x2) /home/user/work/src/github.com/hyperledger/fabric/orderer/ledger/file/factory.go:75 +0xf7 main.createLedgerFactory(0xc4201c06c0, 0x870ad0, 0xc4200ec8c0, 0xc42033e6c0, 0x0) /home/user/work/src/github.com/hyperledger/fabric/orderer/util.go:42 +0x2c3 main.initializeMultiChainManager(0xc4201c06c0, 0x11a18a0, 0x11f2e40, 0xc4201d45d0, 0x1) /home/user/work/src/github.com/hyperledger/fabric/orderer/main.go:207 +0x43 main.main()enter code here/home/user/work/src/github.com/hyperledger/fabric/orderer/main.go:75 +0x37f
Jul 6, 2018 in Blockchain by sabby
• 4,370 points
1,881 views

1 answer to this question.

0 votes

The following commands should help:

sudo mkdir -p /var/hyperledger/production
sudo chown -R $(whoami):$(whoami) /var/hyperledger
answered Jul 6, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

0 votes
1 answer

How to solve EACCES:permission denied error in Hyperledger Composer?

It seems like there is no required ...READ MORE

answered Jul 11, 2018 in Blockchain by digger
• 26,740 points
2,431 views
0 votes
1 answer
0 votes
1 answer

AttributeError while trying to start peer port in Hyperledger.

If you are new to blockchain then ...READ MORE

answered Jul 9, 2018 in Blockchain by digger
• 26,740 points
739 views
0 votes
1 answer

How to solve "error trying install composer runtime" in Hyperledger composer?

I think the docker-compose tool is not ...READ MORE

answered Jul 17, 2018 in Blockchain by slayer
• 29,370 points
894 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,445 views
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
992 views
+1 vote
1 answer
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
2,646 views
+15 votes
5 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP