keepass2android icon indicating copy to clipboard operation
keepass2android copied to clipboard

SFTP connection not working

Open emoxam opened this issue 3 years ago • 8 comments

SFTP connection not working here's a log

12.03.2022 0:29:18:363 -- DatabaseSettingsActivity.OnPause 6 12.03.2022 0:29:18:371 -- Timeout start 12.03.2022 0:29:20:181 -- DatabaseSettingsActivity.OnResume 6 12.03.2022 0:29:20:182 -- DatabaseIsUnlocked=True 6 12.03.2022 0:29:20:182 -- Timeout cancel 12.03.2022 0:29:22:408 -- DatabaseSettingsActivity.OnPause 6 12.03.2022 0:29:22:409 -- Timeout start 12.03.2022 0:29:22:421 -- GroupActivity.OnStart 5 12.03.2022 0:29:22:423 -- GroupActivity.OnResume 5 12.03.2022 0:29:22:424 -- DatabaseIsUnlocked=True 5 12.03.2022 0:29:22:424 -- Timeout cancel 12.03.2022 0:29:22:717 -- DatabaseSettingsActivity.OnStop 6 12.03.2022 0:29:22:719 -- DatabaseSettingsActivity.OnDestroyTrue 6 12.03.2022 0:29:24:186 -- GroupActivity.OnPause 5 12.03.2022 0:29:24:187 -- Timeout start 12.03.2022 0:29:24:207 -- SelectCurrentDbActivity 1: OnActivityResult 11/0 12.03.2022 0:29:24:208 -- AppTask keepass2android.NullTask in OnActivityResult 12.03.2022 0:29:24:209 -- Task in activity SelectCurrentDbActivity 1 changed to NullTask 12.03.2022 0:29:24:218 -- SelectCurrentDbActivity.OnStart 1 12.03.2022 0:29:24:221 -- SelectCurrentDbActivity.OnResume 1 12.03.2022 0:29:24:222 -- DatabaseIsUnlocked=True 1 12.03.2022 0:29:24:222 -- SelectCurrentDbActivity.OnResume 1 12.03.2022 0:29:24:222 -- DatabaseIsUnlocked=True 1 12.03.2022 0:29:24:236 -- FTP: IocToUri out = ftp://77.37.204.239:2121/Untitled.kdbx 12.03.2022 0:29:24:240 -- FTP: IocToUri out = ftp://77.37.204.239:2121/Untitled.kdbx 12.03.2022 0:29:24:258 -- FTP: IocToUri out = ftp://77.37.204.239:2121/Untitled.kdbx 12.03.2022 0:29:24:263 -- FTP: IocToUri out = ftp://77.37.204.239:2121/Untitled.kdbx 12.03.2022 0:29:24:273 -- SelectCurrentDbActivity.OnPause 1 12.03.2022 0:29:24:301 -- FileSelect.OnCreate 12.03.2022 0:29:24:336 -- FileSelect.OnStart 12.03.2022 0:29:24:337 -- FileSelect.OnResume 12.03.2022 0:29:24:346 -- SelectCurrentDbActivity.OnStop 1 12.03.2022 0:29:24:365 -- FTP: IocToUri out = ftp://77.37.204.239:2121/Untitled.kdbx 12.03.2022 0:29:24:369 -- FTP: IocToUri out = ftp://77.37.204.239:2121/reserve.kdbx 12.03.2022 0:29:24:617 -- GroupActivity.OnStop 5 12.03.2022 0:29:24:620 -- GroupActivity.OnDestroyTrue 5 12.03.2022 0:29:25:582 -- FileSelect.OnPause 12.03.2022 0:29:25:606 -- SelectStorageLocationActivity.OnCreate 12.03.2022 0:29:25:987 -- FileSelect.OnStop 12.03.2022 0:29:26:548 -- onAR 12.03.2022 0:29:26:548 -- base.onAR 12.03.2022 0:29:26:552 -- StartSelectFile sftp 12.03.2022 0:29:29:400 -- found 80 in 81 12.03.2022 0:29:29:401 -- cannot autofill 12.03.2022 0:29:46:150 -- Permission denied 12.03.2022 0:29:46:153 -- System.Exception: Permission denied ---> Java.Lang.Exception: Permission denied at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in <72def2bfa5d341bfbf05115bb5c7ca17>:0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <72def2bfa5d341bfbf05115bb5c7ca17>:0 at Keepass2android.Javafilestorage.SftpStorage.GetFileEntry (System.String filename) [0x00029] in <944fe23608a24cc8aab99955fd19639c>:0 at keepass2android.Io.JavaFileStorage.GetFileDescription (KeePassLib.Serialization.IOConnectionInfo ioc) [0x0000e] in <0218d9a0a246400eb61cf9b0c47299ea>:0 --- End of inner exception stack trace --- at keepass2android.Io.JavaFileStorage.GetFileDescription (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00031] in <0218d9a0a246400eb61cf9b0c47299ea>:0 at keepass2android.Io.OfflineSwitchableFileStorage.GetFileDescription (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00000] in <0218d9a0a246400eb61cf9b0c47299ea>:0 at keepass2android.Io.CachingFileStorage.GetFileDescription (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00000] in <0218d9a0a246400eb61cf9b0c47299ea>:0 at keepass2android.FileChooserFileProvider.GetFileEntry (System.String filename, Java.Lang.StringBuilder errorMessageBuilde r) [0x00013] in <7165a5adb3574afbabf24b0ad4c46188>:0 12.03.2022 0:29:47:836 -- onAR 12.03.2022 0:29:47:837 -- base.onAR 12.03.2022 0:29:47:865 -- FileSelect.OnStart 12.03.2022 0:29:47:866 -- FileSelect.OnResume 12.03.2022 0:29:47:890 -- FTP: IocToUri out = ftp://77.37.204.239:2121/Untitled.kdbx 12.03.2022 0:29:47:897 -- FTP: IocToUri out = ftp://77.37.204.239:2121/reserve.kdbx 12.03.2022 0:29:49:383 -- FileSelect.OnPause 12.03.2022 0:29:49:395 -- SelectCurrentDbActivity 1: OnActivityResult Canceled/1 12.03.2022 0:29:49:395 -- TryGetFromActivityResult: no data 12.03.2022 0:29:49:397 -- SelectCurrentDbActivity.OnStart 1 12.03.2022 0:29:49:400 -- SelectCurrentDbActivity.OnResume 1 12.03.2022 0:29:49:400 -- DatabaseIsUnlocked=True 1 12.03.2022 0:29:49:431 -- SelectCurrentDbActivity.OnPause 1 12.03.2022 0:29:49:470 -- GroupActivity.OnCreate 7 12.03.2022 0:29:49:472 -- GroupActivity:apptask= 7 12.03.2022 0:29:49:476 -- Loaded task keepass2android.NullTask 12.03.2022 0:29:49:477 -- Task in activity GroupActivity 7 changed to NullTask 12.03.2022 0:29:49:512 -- GroupActivity.OnStart 7 12.03.2022 0:29:49:512 -- GroupActivity.OnResume 7 12.03.2022 0:29:49:512 -- DatabaseIsUnlocked=True 7 12.03.2022 0:29:49:513 -- Timeout cancel 12.03.2022 0:29:49:535 -- SelectCurrentDbActivity.OnStop 1 12.03.2022 0:29:49:851 -- FileSelect.OnStop 12.03.2022 0:29:49:931 -- FileSelect.OnDestroyTrue 12.03.2022 0:29:52:847 -- GroupActivity.OnPause 7 12.03.2022 0:29:52:848 -- Timeout start 12.03.2022 0:29:52:878 -- DatabaseSettingsActivity.OnCreate 8 12.03.2022 0:29:52:879 -- DatabaseSettingsActivity:apptask= 8 12.03.2022 0:29:52:946 -- DatabaseSettingsActivity.OnStart 8 12.03.2022 0:29:52:946 -- DatabaseSettingsActivity.OnResume 8 12.03.2022 0:29:52:947 -- DatabaseIsUnlocked=True 8 12.03.2022 0:29:52:947 -- Timeout cancel 12.03.2022 0:29:53:221 -- GroupActivity.OnStop 7

emoxam avatar Mar 12 '22 07:03 emoxam

screenshot with error is here https://yadi.sk/i/BlGlW9y99KB3gA

emoxam avatar Mar 12 '22 07:03 emoxam

did you check the permissions of the user for accessing the files? (see e.g. https://www.pcwdld.com/troubleshooting-sftp-permission-denied)?

PhilippC avatar Mar 14 '22 09:03 PhilippC

This one works well

https://play.google.com/store/apps/details?id=mobilesftp.feng.gao

⁣Получить BlueMail для Android ​

На 14 мар. 2022 г., 12:04, в 12:04, PhilippC @.***> написал:п>did you check the permissions of the user for accessing the files? (see

e.g. https://www.pcwdld.com/troubleshooting-sftp-permission-denied)?

-- Reply to this email directly or view it on GitHub: https://github.com/PhilippC/keepass2android/issues/1948#issuecomment-1066536119 You are receiving this because you authored the thread.

Message ID: @.***>

emoxam avatar Mar 14 '22 09:03 emoxam

KP2A is calling "stat" on each file to view file size etc. in the file browser: https://epaul.github.io/jsch-documentation/simple.javadoc/com/jcraft/jsch/ChannelSftp.html#stat-java.lang.String-

Maybe other apps are not doing this, but I think "permission denied" means "permission denied" and is something that should be solved on the server configuration side.

PhilippC avatar Mar 28 '22 09:03 PhilippC

@emoxam I know it has been a long time, but have you been able to solve this? I had a similar problem. Accessing the file via SFTP worked, but when writing the file, it would give me "permission denied". I since then turned off "File Transactions", located in Settings -> App Settings -> File Handling. This solved my issue and I am now able to synchronize back and forth.

Hope this helps.

inzsome avatar Dec 25 '23 16:12 inzsome

@inzsome I can't even open my file via SFTP. File transaction disabling didn't help.

emoxam avatar Dec 26 '23 16:12 emoxam

26.12.2023 19:01:31:290 -- GroupActivity.OnStop 4
26.12.2023 19:01:31:295 -- GroupActivity.OnDestroyTrue 4
26.12.2023 19:01:32:624 -- FileSelect.OnPause
26.12.2023 19:01:32:639 -- SelectStorageLocationActivity.OnCreate
26.12.2023 19:01:33:337 -- FileSelect.OnStop
26.12.2023 19:01:33:681 -- onAR
26.12.2023 19:01:33:681 -- base.onAR
26.12.2023 19:01:33:682 -- StartSelectFile sftp
26.12.2023 19:01:33:945 -- parsing autofillStructure...
26.12.2023 19:01:33:946 -- Parsing done
26.12.2023 19:01:33:947 -- cannot autofill
26.12.2023 19:02:02:0 -- Permission denied
26.12.2023 19:02:02:4 -- System.Exception: Permission denied ---> Java.Lang.Exception: Permission denied
  at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in <6fb1725a77344b3e81b15cb69a959b5c>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0003c] in <6fb1725a77344b3e81b15cb69a959b5c>:0 
  at Keepass2android.Javafilestorage.SftpStorage.GetFileEntry (System.String filename) [0x00029] in <ef4fc53bed604ca380e5f749cd276ee6>:0 
  at keepass2android.Io.JavaFileStorage.GetFileDescription (KeePassLib.Serialization.IOConnectionInfo ioc) [0x0000e] in <483bd1ecfe364ef6a0dfb2f58ee9f0f5>:0 
   --- End of inner exception stack trace ---
  at keepass2android.Io.JavaFileStorage.GetFileDescription (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00031] in <483bd1ecfe364ef6a0dfb2f58ee9f0f5>:0 
  at keepass2android.Io.OfflineSwitchableFileStorage.GetFileDescription (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00000] in <483bd1ecfe364ef6a0dfb2f58ee9f0f5>:0 
  at keepass2android.Io.CachingFileStorage.GetFileDescription (KeePassLib.Serialization.IOConnectionInfo ioc) [0x00000] in <483bd1ecfe364ef6a0dfb2f58ee9f0f5>:0 
  at keepass2android.FileChooserFileProvider.GetFileEntry (System.String filename, Java.Lang.StringBuilder errorMessageBuilder) [0x00013] in <fb40c821fb5144dda464d1c7539af8a0>:0 
26.12.2023 19:03:09:919 -- onAR
26.12.2023 19:03:09:919 -- base.onAR
26.12.2023 19:03:09:938 -- FileSelect.OnStart
26.12.2023 19:03:09:939 -- FileSelect.OnResume
26.12.2023 19:03:09:958 -- FTP: IocToUri

emoxam avatar Dec 26 '23 16:12 emoxam

can you try to give the app file access permissions? this error might indicate that editing the known_hosts does not work?

PhilippC avatar Jan 02 '24 13:01 PhilippC