Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two installation issues #52

Open
elyograg opened this issue Nov 28, 2017 · 1 comment
Open

Two installation issues #52

elyograg opened this issue Nov 28, 2017 · 1 comment

Comments

@elyograg
Copy link

I ran into two problems while trying to install d-note today, and neither was straightforward to diagnose.

One problem is that only two explicitly hard-coded locations are searched for d-note.ini. The first path searched is /etc/dnote, the other is ~/.dnote ... but the instructions do not explicitly state that only these paths are supported. They do say that one of these paths is recommended ... but unless the code is modified, that should say required. I think that the current directory as well as the location of the .wsgi file should be searched, and possibly some other well-known locations in the git working directory. The generate_dnote_hashes script seems to use the same code.

The other problem is the permissions on the dconfig.py file, which may be the problem that the user who filed issue #48 was having. This problem took even longer to track down than the limited ini file locations, because I had to add debug lines to the script that would give a better stacktrace. Only after adding some lines for debugging was I able to determine that dconfig couldn't be imported, despite its location being added to sys.path.

Here's the cause of the second problem: I ran "generate_dnote_hashes" as root. The dconfig.py file was created with 440 permissions, owned by root:root. This meant that the apache user was unable to read the file, so dconfig couldn't be imported, and the traceback in the apache error log was useless except for pointing me at line 47 of note.py. The printed note about needing to run generate_dnote_hashes was NOT included in the apache error log, so I never saw that output.

For both problems, the message for the traceback must be improved so the user has some idea of what's actually gone wrong. For the second problem, the permissions on dconfig.py should be at least 444, if not 644. I can work up a patch for the traceback messages, but I haven't investigated the permission issue yet to see if it's something I know how to fix.

@skiedude
Copy link

skiedude commented Jan 7, 2019

This helped me out greatly, changing the perms on the dconfig.py to 444, and then changing the perms on /var/lib/dnote/data so that apache could write to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants