boost:filesystem_error | permission denied to /.hush #55

Closed
opened 3 years ago by oDinZu · 10 comments
oDinZu commented 3 years ago

The problem occured more than once. It looks like it is looking for .hush in the / root folders, rather than the ~ "home" user directory. Of course it would error if it looking at root directory from non-root user.

It shows that the hush3:dev branch compiled the binaries, but when running ./src/hushd the following error is produced.

Update: I have tested the hush:master branch and it compiled successfully without any errors or problems. I am running full node hush daemon on 21.04. This means, it must be something with the hush:dev branch

tail -f -n 100 ~/.hush/HUSH3/debug.log doesn't have any logs..

gdb .src/hushd

hush3$ ./src/hushd
.oO Starting HUSH Full Node (Extreme Privacy!) with genproc=-1 notary=0
hush_args: Setting custom HUSH3 reward HUSH3=1 reward,halving,subsidy chain values...
228 234 235 236 241 nonz.5 ccenables[]
append ac_script 76a9145eb10cf64f2bab1b457f1f25e658526155928fac88ac
extralen.171 before disable bits
hush3 <- CCLIB name
hush_args: ASSETCHAINS_BLOCKTIME=150, extralen=212
HUSH raw magic=0000000000000000000000000000000000000000000000000000000000000000008100000000000000000000000000000081000000000000000000000000000000203005000000000040230e4300000000203005000000000000000000000000003e78a50000000000d088c31000000000a0d21e000000000000000000000000000200000000000000c78aa900000200000176a9145eb10cf64f2bab1b457f1f25e658526155928fac88acfeffffffffffffffffffffffffffffffffffffffffffffffffffffffefe3fdff687573683396000000 extralen=212 crc0=343844f1
hush_port: extralen=212, supply=6178674


************************
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::create_directories: Permission denied: "/.hush"       
Hush in AppInit()       

Shutdown: stopping HUSH HTTP/REST/RPC
Shutdown: stopping node
terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
  what():  boost::filesystem::create_directories: Permission denied: "/.hush"
Aborted (core dumped)

Computer Software | Hardware

  • System is AMD64 architecture
  • Ubuntu 21.04
  • Git branch is hush:dev
The problem occured more than once. It looks like it is looking for .hush in the / root folders, rather than the ~ "home" user directory. Of course it would error if it looking at root directory from non-root user. It shows that the **hush3:dev** branch compiled the binaries, but when running `./src/hushd` the following error is produced. Update: I have tested the hush:master branch and it compiled successfully **without** any errors or problems. I am running full node hush daemon on 21.04. This means, it must be something with the hush:dev branch `tail -f -n 100 ~/.hush/HUSH3/debug.log` doesn't have any logs.. `gdb .src/hushd` ``` hush3$ ./src/hushd .oO Starting HUSH Full Node (Extreme Privacy!) with genproc=-1 notary=0 hush_args: Setting custom HUSH3 reward HUSH3=1 reward,halving,subsidy chain values... 228 234 235 236 241 nonz.5 ccenables[] append ac_script 76a9145eb10cf64f2bab1b457f1f25e658526155928fac88ac extralen.171 before disable bits hush3 <- CCLIB name hush_args: ASSETCHAINS_BLOCKTIME=150, extralen=212 HUSH raw magic=0000000000000000000000000000000000000000000000000000000000000000008100000000000000000000000000000081000000000000000000000000000000203005000000000040230e4300000000203005000000000000000000000000003e78a50000000000d088c31000000000a0d21e000000000000000000000000000200000000000000c78aa900000200000176a9145eb10cf64f2bab1b457f1f25e658526155928fac88acfeffffffffffffffffffffffffffffffffffffffffffffffffffffffefe3fdff687573683396000000 extralen=212 crc0=343844f1 hush_port: extralen=212, supply=6178674 ************************ EXCEPTION: N5boost10filesystem16filesystem_errorE boost::filesystem::create_directories: Permission denied: "/.hush" Hush in AppInit() Shutdown: stopping HUSH HTTP/REST/RPC Shutdown: stopping node terminate called after throwing an instance of 'boost::filesystem::filesystem_error' what(): boost::filesystem::create_directories: Permission denied: "/.hush" Aborted (core dumped) ``` ### Computer Software | Hardware - System is AMD64 architecture - Ubuntu 21.04 - Git branch is hush:dev
Poster

Most likely a problem with the recent updates with: src/util.cpp

ln 557?

The error is trying to create a .hush foler in / directly.

Most likely a problem with the recent updates with: **src/util.cpp** ln 557? The error is trying to create a .hush foler in / directly.
Poster

On Hush 3.8.0

It seems I have received a similar error..but it was noticed after I sent the stop command to hushd.

./src/hush-cli stop 


************************
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::create_directories: Permission denied: "/.komodo"       
Hush in AppInitRPC()

Furthermore, I am unable to even use CTRL + C.
On exiting of terminal, the hushd continues to run.

On Hush 3.8.0 It seems I have received a similar error..but it was noticed after I sent the stop command to hushd. ``` ./src/hush-cli stop ************************ EXCEPTION: N5boost10filesystem16filesystem_errorE boost::filesystem::create_directories: Permission denied: "/.komodo" Hush in AppInitRPC() ``` Furthermore, I am unable to even use CTRL + C. On exiting of terminal, the hushd continues to run.
Owner

@odinzu by using the master branch, you created ~/.komodo/HUSH3 and then the dev branch will use that instead of creating a new ~/.hush/HUSH3. It also seems like you ran things as root, maybe inside docker?

I agree that this is a bug in that we should not coredump and we should maybe warn the user to not run hushd as root, ever. Even inside of a docker container, running as root is a bad idea.

@odinzu by using the master branch, you created ~/.komodo/HUSH3 and then the dev branch will use that instead of creating a new ~/.hush/HUSH3. It also seems like you ran things as root, maybe inside docker? I agree that this is a bug in that we should not coredump and we should maybe warn the user to not run hushd as root, ever. Even inside of a docker container, running as root is a bad idea.
Poster

Yeah, I received this error again today. I was NOT in docker as root and am using a normal user on the development machine.

I remember you stating something about setting HOME, but I never had to do this since the beginning of my Hush journey. Maybe setting home for Docker vm, but not on core development machine.

************************
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::create_directories: Permission denied: "/.hush"       
Hush in AppInitRPC()  

After a FRESH build of hush3:dev today & after removing all .hush and .komodo to .backups. I switched to hush:dev, then compiled fresh bins. Then ran a fresh hushd. Everything worked great with ./src/hushd; then, I ran ./src/hush-cli help and the following message error populated above.

Update:

When I do ls /home/ it displays the correct home via username

For some odd reason, hush-cli is looking at / directory for .hush.

Update:

When I test sudo ./src/hush-cli help it says:

Error reading configuration file: Missing komodo.conf

It shouldn't be looking for a komodo.conf. Of course it found an error like this, because there is no .hush or .komodo directory in root.

Yeah, I received this error again today. I was NOT in docker as root and am using a normal user on the development machine. I remember you stating something about setting HOME, but I never had to do this since the beginning of my Hush journey. Maybe setting home for Docker vm, but not on core development machine. ``` ************************ EXCEPTION: N5boost10filesystem16filesystem_errorE boost::filesystem::create_directories: Permission denied: "/.hush" Hush in AppInitRPC() ``` After a FRESH build of hush3:dev today & after removing all .hush and .komodo to .backups. I switched to hush:dev, then compiled fresh bins. Then ran a fresh hushd. Everything worked great with `./src/hushd`; then, I ran `./src/hush-cli help` and the following message error populated above. Update: When I do `ls /home/` it displays the **correct** home via **username** For some odd reason, hush-cli is looking at / directory for .hush. Update: When I test `sudo ./src/hush-cli help` it says: ``` Error reading configuration file: Missing komodo.conf ``` It shouldn't be looking for a komodo.conf. Of course it found an error like this, because there is no .hush or .komodo directory in root.
Poster

I ran gdb ./src/hush-cli and it populated the correct help options.

Update:

Okay, so I am able to run ./src/hush-cli without gdb and it populates correct information same as gdb.

On running ./src/hush-cli help or any other option, I receive the permission issue.

Could this issue happen because I am still syncing blocks?

I ran `gdb ./src/hush-cli` and it populated the correct help options. **Update:** Okay, so I am able to run `./src/hush-cli` without gdb and it populates correct information same as gdb. On running ./src/hush-cli **help** or any other option, I receive the permission issue. Could this issue happen because I am still syncing blocks?
Owner

@oDinZu set HOME to the proper env var in your Dockerfile and things will likely work. If HOME is not set, which it's not in your case, then the root directory / is assumed to be HOME.

You are not allowed to create a directory called /.hush/ and that is the 'Permission denied` error.

@oDinZu set HOME to the proper env var in your Dockerfile and things will likely work. If HOME is not set, which it's not in your case, then the root directory / is assumed to be HOME. You are not allowed to create a directory called `/.hush/` and that is the 'Permission denied` error.
Poster

@oDinZu set HOME to the proper env var in your Dockerfile and things will likely work. If HOME is not set, which it's not in your case, then the root directory / is assumed to be HOME.

You are not allowed to create a directory called /.hush/ and that is the 'Permission denied` error.

Yeah, I received this error again today. I was NOT in docker as root and am using a normal user on the development machine.

> @oDinZu set HOME to the proper env var in your Dockerfile and things will likely work. If HOME is not set, which it's not in your case, then the root directory / is assumed to be HOME. > > You are not allowed to create a directory called `/.hush/` and that is the 'Permission denied` error. Yeah, I received this error again today. I was NOT in docker as root and am using a normal user on the development machine.
Owner

@oDinZu you are right, it should not be looking for komodo.conf, and indeed, it is not. It's just a shitty error message that I am updating now, so it reports the correct config file name it could not find.

@oDinZu you are right, it should not be looking for komodo.conf, and indeed, it is not. It's just a shitty error message that I am updating now, so it reports the correct config file name it could not find.

@oDinZu did you ever determine any root cause or resolution to this issue?

Was this just on the Ubuntu 21.04 install?

I ask as 21.04 just became End of life recently on Jan 20, 2022, so if this issue was only with 21.04 then we can close it as that OS is now not supported by the vendor.

@oDinZu did you ever determine any root cause or resolution to this issue? Was this just on the Ubuntu 21.04 install? I ask as [21.04 just became End of life recently](https://fridge.ubuntu.com/2022/01/21/ubuntu-21-04-hirsute-hippo-end-of-life-reached-on-january-20-2022/) on Jan 20, 2022, so if this issue was only with 21.04 then we can close it as that OS is now not supported by the vendor.
duke commented 1 year ago
Owner

Code has changed drastically since this error happened and nobody else ever reproduced it. Closing

Code has changed drastically since this error happened and nobody else ever reproduced it. Closing
duke closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.