Opened 7 years ago

Closed 2 years ago

#6780 closed defect (wontfix)

Config fails with non-existent parent of DataDirectory

Reported by: robgjansen Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-client
Cc: robgjansen, karsten Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When passing the "DataDirectory DIR" option, Tor fails during configuration parsing/validation:

[tor-warn] check_private_dir() Error creating directory ./data/middledata/middle: No such file or directory
[tor-warn] Failed to parse/validate config: Couldn't access/create private data directory "./data/middledata/middle"
[tor-err] tor_init() Reading config failed--see warnings above.

In this case data/ existed, but middledata/ (and therefore middledata/middle/) did not. Does it make sense to have check_private_dir() create the parent directories too, like 'mkdir -p'?

Child Tickets

Change History (11)

comment:1 Changed 7 years ago by nickm

Component: - Select a componentTor Client

comment:2 Changed 7 years ago by nickm

Keywords: tor-client added

comment:3 Changed 7 years ago by nickm

Component: Tor ClientTor

comment:4 Changed 6 years ago by karsten

Cc: karsten added

comment:5 Changed 6 years ago by nickm

Hm. I'm ambivalent. It'd be convenient, but it might cause errors. If you're starting Tor as root, do you really want to create "/vaar/run/tor" rather than getting a "/var/run: No such file or directory" warning?

If we decide to do this, I'd take a patch so long as the small-features window is open.

comment:6 in reply to:  5 Changed 6 years ago by arma

Replying to nickm:

Hm. I'm ambivalent. It'd be convenient, but it might cause errors. If you're starting Tor as root, do you really want to create "/vaar/run/tor" rather than getting a "/var/run: No such file or directory" warning?

Do you chown the parent directories to your user, or not? It would seem that doing it would produce bad behavior sometimes, and not doing it would produce bad behavior other times.

comment:7 Changed 6 years ago by robgjansen

FYI, I don't care enough to fight for this so I'll go with whatever you guys decide.

comment:8 Changed 6 years ago by nickm

Milestone: Tor: 0.2.4.x-finalTor: unspecified

comment:9 Changed 6 years ago by karsten

So, what's the decision? If we want this feature, I'd like to try writing a patch. But if not, I'd rather not want to spend time on this.

comment:10 Changed 6 years ago by nickm

I'm still ambivalent. Let's leave this open, minor, and in "unspecified" unless somebody cares strongly and comes up with a great argument for it.

comment:11 Changed 2 years ago by nickm

Resolution: wontfix
Severity: Normal
Status: newclosed
Note: See TracTickets for help on using tickets.