geopaparazzi / GSS

2 stars 5 forks source link

PERMISSION DENIED #9

Closed frafra closed 3 years ago

frafra commented 3 years ago

Here is the error when I use SMASH:

gss_1       | ACCESS:: ServletUtils:: 2021-05-10 14:38:22:: ServletUtils:: PERMISSION DENIED: on connection ip: 158.38.1.70 for user 37b29deb4eb153f6 with pwd testPwd

Here is how I launched the server:

gss_1       | + exec java -Xmx4g -jar gss-backbone.jar /workspace testPwd keystore.db jdbc:postgresql://postgres:5432/test

testPwd appears in both the command line and in the error message. Am I missing something?

moovida commented 3 years ago

I hope the last part of this chapter (30 seconds windows):

https://www.geopaparazzi.org/gss/index.html#_the_surveyors_view

frafra commented 3 years ago

I should have specified that I already pushed such button.

gss_1       | ACCESS:: /usersettings:: 2021-05-10 14:54:08:: /usersettings:: Received request by user frafra from 192.168.0.1
gss_1       | DEBUG:: /upload:: 2021-05-10 14:54:15:: /upload:: Received request from 192.168.0.1
gss_1       | ACCESS:: ServletUtils:: 2021-05-10 14:54:15:: ServletUtils:: PERMISSION DENIED: on connection ip: 158.38.1.70 for user 37b29deb4eb153f6 with pwd testPwd

Here you can see that 7 seconds after I clicked the button, I get a PERMISSION DENIED, when trying to import or export the project.

frafra commented 3 years ago

I am investigating on that, as I cannot reproduce with the latest master.

moovida commented 3 years ago

Oh, if you are still on it, give me a sign. Then I would look to fix the commandline now. Else I will move to tomorrow morning.

moovida commented 3 years ago

I am giving a look at the code, I am not sure that it should not work. Can you look at the log and see what this part of java code would print out? It should happen once the db connection occurred:

        System.out.println("****************************************************");
        System.out.println("* Launching with parameters:");
        System.out.println("* \tLAUNCH FOLDER: " + new File(".").getAbsolutePath());
        System.out.println("* \tWORKSPACE FOLDER: " + workspacePath);
        System.out.println("* \tSSL KEYSTORE FILE: " + (keyStorePath != null ? keyStorePath : " - nv - "));
        System.out.println("* \tMOBILE PWD: " + (mobilePwd != null ? mobilePwd : " - nv - "));
        if (postgresUrl != null) {
            System.out.println("* \tDATABASE: " + postgresUrl);
        } else {
            System.out.println("* \tDATABASE: " + db.getDatabasePath());
        }
        System.out.println("****************************************************");

You recognise it from the asteriscs.

moovida commented 3 years ago

Ok, just as info @frafra , I took the chance to make the arguments part properly. It is getting there and will be something like:

usage: gss
 -mp,--mobilepwd <arg>   The password used by mobile devices to connect
                         (defaults to testPwd).
 -p,--psql_url <arg>     The optional url to enable postgis database use
                         (disables H2GIS).
 -pp,--psql_pwd <arg>    The optional postgis password (defaults to test).
 -pu,--psql_user <arg>   The optional postgis user (defaults to test).
 -s,--ssl <arg>          The optional path to the keystore file for ssl.
 -sp,--ssl_pwd <arg>     The optional password for the keystore file.
 -w,--workspace <arg>    The path to the workspace.

If you have remarks, speak up now or never more :-)

moovida commented 3 years ago

Ok, this is now fixed by commit fd3555e