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

Could not create user - make sure the database file is writable #1

Closed
Sleynd opened this issue Mar 31, 2020 · 12 comments
Closed

Could not create user - make sure the database file is writable #1

Sleynd opened this issue Mar 31, 2020 · 12 comments

Comments

@Sleynd
Copy link

Sleynd commented Mar 31, 2020

Hello I followed the youtube video, at the time of the recording on the link http://127.0.0.1:5000/install/ , I receive the following error Could not create user - make sure the database file is writable . Can you help me ? Thank you very luch

@sadreck
Copy link
Contributor

sadreck commented Mar 31, 2020

Hi,

Can you check the permissions on the following file ./data/instance/crackerjack.sqlite3? You can run ls -ahl in that folder.

Also, did you run any commands as sudo by any chance?

Pavel

@Sleynd
Copy link
Author

Sleynd commented Mar 31, 2020

Thanks for answering. Here's the return of the commands :

(venv) hashcat@hashcat:~/crackerjack/data/instance$ sudo ls -ahl
total 248K
drwxrwxr-x 2 hashcat hashcat 4,0K mars 31 15:23 .
drwxrwxr-x 3 hashcat hashcat 4,0K mars 31 15:22 ..
-rw-r--r-- 1 hashcat hashcat 236K mars 31 15:23 crackerjack.sqlite3

(venv) hashcat@hashcat:/crackerjack/data/instance$ pwd
/home/hashcat/crackerjack/data/instance
(venv) hashcat@hashcat:
/crackerjack/data/instance$

Yes, I ran sudo commands.

@sadreck
Copy link
Contributor

sadreck commented Mar 31, 2020

From the output of your ls, you setup the environment using the user hashcat (as that user owns the file).

If you run flask run with the user hashcat it should work fine. Are you by any chance running it with sudo (I didn't use any sudo commands in the video)?

@sadreck
Copy link
Contributor

sadreck commented Mar 31, 2020

I just realised what I said, as running it with sudo would probably work. Which user are you running flask run with?

@Sleynd
Copy link
Author

Sleynd commented Mar 31, 2020

Ok I redid the whole installation process with the hashcat user. I didn't do any sudo during the installation, same problem. The flask run is launched with my hashcat user. I'm going to find out what the problem is.

@sadreck
Copy link
Contributor

sadreck commented Mar 31, 2020

Can you keep me posted when you find out what the issue was please?

One more question - is there a debug trace with the error? Something to help us dig into the cause?

@sadreck
Copy link
Contributor

sadreck commented Apr 8, 2020

Did you get it to work?

@Sleynd
Copy link
Author

Sleynd commented Apr 9, 2020

Hi, No, unfortunately, it's still not working. I tested in a new Ubuntu VM and even problem the only difference I have is that python is in 3.6 and not 3.7.

@sadreck
Copy link
Contributor

sadreck commented Apr 9, 2020

This is really weird. When you run it using:

. venv/bin/activate
export FLASK_ENV=development
export FLASK_APP=app
flask run

The moment you see the error, is there any debug log/trace appearing on the terminal?

I'm quite curious as to why it's not working, cause I tested Ubuntu 14/16/18 for both manual install and the ansible one.

@sadreck
Copy link
Contributor

sadreck commented Apr 9, 2020

I've added an extra debug message - the previous error was quite generic/wrong.

My assumption is that the password complexity isn't matched. Can you do a fresh git clone or git pull and try again please (even on an existing installation)? You should see a more descriptive error message.

@Sleynd
Copy link
Author

Sleynd commented Apr 9, 2020

Great, it's working!

So the problem was the password that didn't respect the requirements

After making a git clone, the following error appeared in the browser: could not create user:password does not meet the complexity requierements ...

So I put a stronger password

The problem is solved I go to see test your software :)

Thanks a lot for your help, I wish you a good day.

@Sleynd Sleynd closed this as completed Apr 9, 2020
@sadreck
Copy link
Contributor

sadreck commented Apr 9, 2020

Excellent, glad to hear it's working! Sorry for not including that debug message before and thanks for raising this issue.

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