bug: export IPFS_PATH to file server throws error during ipfs init
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
I made this post on the discussion page at [ipfs.io](https://discuss.ipfs.io/t/export-ipfs-path-not-working/2557?u=skipwoosnam). I was told this is most likely a bug and to post this over here.
#### Version information:
`ipfs version --all`
go-ipfs version: 0.4.14-
Repo version: 6
System version: amd64/linux
Golang version: go1.10
#### Type: Bug
#### Description:
Desktop OS: Ubuntu 16.04 on physical SSD
File server OS: Debian 9.4 on VM in Proxmox 5.1-46
I am trying to find a way to make IPFS more practical for me. My main OS is ubuntu 16.04 and it is on a 120 gb SSD. In my home network I have a server that I use for storage that has 21 TB on it. I would like to configure IPFS to use my network storage to save the files I add with `ipfs add ` so I don't fill up my SSD. Reading into the documentation it says the following towards the bottom after running `ipfs --help` from the command line.
Use 'ipfs --help' to learn more about each command.
ipfs uses a repository in the local file system. By default, the repo is
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
environment variable:
export IPFS_PATH=/path/to/ipfsrepo
In zsh I have set the IPFS_PATH variable in my .zshrc file with the following entry
export IPFS_PATH=/media/network_storage/FTP/ipfs
after saving and opening up a new shell, when I run
echo $IPFS_PATH
it returns
/media/network_storage/FTP/ipfs
Now, when I go to initialize ipfs (using both `ipfs init` and `ipfs init --profile=server`) the following happens (there is no ~/.ipfs directory and the /media/network_storage/FTP/ipfs directory is empty as well)
initializing IPFS node at /media/network_storage/FTP/ipfs
generating 2048-bit RSA keypair...done
peer identity: Qma2soquUqaxZ3RmJp5QpC3GrbTtykywuhmbkcT8tW41F7
Error: open /media/network_storage/FTP/ipfs/blocks/_README: permission denied
when I run `tree` on my $IPFS_PATH I get the following:
.
├── blocks
│ ├── _README
│ └── SHARDING
├── config
├── datastore_spec
└── version
if I remove the $IPFS_PATH from my .zshrc and start a new shell and run `ipfs init` there is no issue initializing ipfs. The ipfs folder is created at "~/.ipfs" and it contains the following
.
├── blocks
│ ├── 2H
│ │ └── CIQN5PVU4ECEKNEVXWRYKCPTVMIPHP5AWWKOCGCPXVNMF7ZWU6UG2HI.data
│ ├── 7J
│ │ └── CIQKKLBWAIBQZOIS5X7E32LQAL6236OUKZTMHPQSFIXPWXNZHQOV7JQ.data
│ ├── 7R
│ │ └── CIQIVZGLOUFY5L4TEYD5WLSCRDDEAW2TNVZSH3OBM5UKNOREHYSY7RA.data
│ ├── B5
│ │ └── CIQDOZU3EAGXWK3PLVFOFOZOAE5USX3XM6I5CSHSQGTML2BAGN7MB5I.data
│ ├── IL
│ │ └── CIQJFGRQHQ45VCQLM7AJNF2GF5UHUAGGHC6LLAH6VYDEKLQMD4QLILY.data
│ ├── JN
│ │ └── CIQPHMHGQLLZXC32FQQW2YVM4KGFORVFJAQYY55VK3WJGLZ2MS4RJNQ.data
│ ├── L5
│ │ └── CIQBIQXZ4NWWDXUSIYSCX7RE6EBXHMGENZNMUDEMGNKMGT2K6LLUL5Y.data
│ ├── LG
│ │ └── CIQJBQD2O6K4CGJVCCTJNUP57QHR4SKHZ74OIITBBGLOMCO3ZOLWLGA.data
│ ├── N2
│ │ └── CIQDWKPBHXLJ3XVELRJZA2SYY7OGCSX6FRSIZS2VQQPVKOA2Z4VXN2I.data
│ ├── OO
│ │ └── CIQBT4N7PS5IZ5IG2ZOUGKFK27IE33WKGJNDW2TY3LSBNQ34R6OVOOQ.data
│ ├── PM
│ │ └── CIQKNNRB2NFYXUZDJ2UWNMSKYLGTKUYDRQTJCDI7JTUDFH6YOYNUPMA.data
│ ├── QV
│ │ └── CIQOHMGEIKMPYHAUTL57JSEZN64SIJ5OIHSGJG4TJSSJLGI3PBJLQVI.data
│ ├── R3
│ │ └── CIQBED3K6YA5I3QQWLJOCHWXDRK5EXZQILBCKAPEDUJENZ5B5HJ5R3A.data
│ ├── _README
│ ├── SH
│ │ └── CIQL3XIOKVDAW5KQF6NNWGFFYAHEQP63TJOVZHAEO7XZBD7KQOCSSHY.data
│ ├── SHARDING
│ └── X3
│ └── CIQFTFEEHEDF6KLBT32BFAGLXEZL4UWFNWM4LFTLMXQBCERZ6CMLX3Y.data
├── config
├── datastore
│ ├── 000002.ldb
│ ├── 000003.log
│ ├── CURRENT
│ ├── LOCK
│ ├── LOG
│ └── MANIFEST-000004
├── datastore_spec
├── keystore
└── version
The way I mount my network storage is with this line in my /etc/fstab
//192.168.1.253/storage_pool /media/network_storage cifs uid=1000,gid=1000,credentials=/home/beard/.network_pw,iocharset=utf8 0 0
It looks as if when trying to initialize IPFS over my network something happens where it is not able to create the datastore directory and the directories and files under $IPFS_PATH/blocks
when I run `id` I get the following output
`uid=1000(beard) gid=1000(beard) groups=1000(beard),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare),129(docker)`
When I go to /media/network_storage/FTP/ and run `ls -ln` I get the following output for my ipfs directory
`drwxrwxrwx+ 3 1000 1000 0 Apr 11 20:03 ipfs`
I have also tried to use symoblic links with no luck either.
I have never submitted and issue on github before so I hope the above is useful/correct and hasn't violated any rules. If I have made any error in submitting this issue please let me know and I will change what needs to be changed. If there is any additional information I can provide that can be of use please let me know what is needed and the quickest way to get it and I will do my best to provide it.
Thank you for your help
Contributor guide
Assessment
This issue has not been assessed yet.