HelloZeroNet / HelloZeroNet/ZeroNet

should zeronet.conf need to have all the configuration as shared in the example ?

Open
#1,271 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
18.8k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

### Step 1: Please describe your environment

* ZeroNet version: 0.6.1 r3234
* Operating system: Debian buster
* Web browser: 52.6.0
* Tor status: always
* Opened port: no
* Special configuration: in /etc/tor

```
ControlPort 9051
CookieAuthentication 1
```
from https://zeronet.readthedocs.io/en/latest/faq/#how-to-make-zeronet-work-with-tor-under-linux

### Step 2: Describe the problem:

I just want to have the log directory in a separate directory not anything else.

See https://zeronet.readthedocs.io/en/latest/faq/#is-it-possible-to-use-a-configuration-file

I want/ed to do -

You can put your configuration options to a zeronet.conf file. Example:

```
[global]
log_dir = ~/log/

```

I get the following error message -

```
- Starting ZeroNet...
ERROR:root:Unhandled exception: [Errno 2] No such file or directory: '~/log/'
Traceback (most recent call last):
File "zeronet.py", line 18, in main
import main
File "/home/shirish/games/ZeroNet-master/src/main.py", line 32, in
os.mkdir(config.log_dir)
OSError: [Errno 2] No such file or directory: '~/log/'
Traceback (most recent call last):
File "zeronet.py", line 91, in
main()
File "zeronet.py", line 64, in main
traceback.print_exc(file=open(config.log_dir + "/error.log", "a"))
AttributeError: 'Config' object has no attribute 'log_dir'

```

This is when I have made -

```
/home/shirish/games/ZeroNet-master> ls -l | grep log
drwxr-xr-x 2 shirish shirish 4096 Jan 31 12:58 log
```

I have tried it both with zeronet-stable 0.6.1 and zeronet-master and got the same error message.

I am happy with all the other defaults hence don't want to change anything and don't even know why I need to change the other options such as data-dir and UI-restrict bits. There is simply no explanation of what those options do.

* What did you expect to happen?

I expected it to run without issues as I have given the path. I actually expected to make the log directory when it was not there but didn't and had to create it manually.

I did read https://github.com/HelloZeroNet/ZeroNet/issues/1192 to see if I could get more input or understanding but didn't.

At the end had to remove zeronet.conf to access zeronet.py via python otherwise it was not happening.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.