Friday, May 25, 2018

linux - Can't show the content of /sdcard of my Android phone from Ubuntu's Nautilus or FileZilla via sftp


I set up a ssh server on Android using SSH Server by Ice Code App.




After upgrading from Android 4.3 to 4.4.2,



  • sftp from Nautilus or FileZilla in Ubuntu to Android can't read or write the content of /sdcard any more.

  • But ssh and scp from terminal in Ubuntu can still read, write and transfer files in /sdcard.


I connect using the same ssh user t in sftp from Nautilus, and ssh and scp from terminal, although why is the ssh prompt u0_a116@C6730 rather than t@c6730?


If they indeed use the same ssh user, why is there the difference in read permission?


In ssh to Android, I see the read, write and excecution permissions for "others" users are not allowed:


u0_a116@C6730:/ $ ls -l
...

lrwxrwxrwx root root 1970-01-11 17:07 sdcard -> /storage/sdcard0
...

u0_a116@C6730:/sdcard $ ls -l
drwxrwx--- root sdcard_r 1980-01-01 00:00 Alarms
drwxrwx--x root sdcard_r 2015-07-22 08:05 Android
drwxrwx--- root sdcard_r 2015-08-18 22:41 Cardboard
drwxrwx--- root sdcard_r 2015-08-20 19:40 DCIM
drwxrwx--- root sdcard_r 2015-08-29 21:22 Download
...


I guess my ssh user t belongs to the "other" group. but don't know how to confirm that. I couldn't add the permissions:


u0_a116@C6730:/sdcard $ chmod -R a+r Download/                                 
Bad mode

What does the "Bad mode" error mean?


What are some solutions?




  • Can I change file permissions on Android directly? Do I need root? But I heard that rooting my device Kyocera Hydro Icon with Android 4.4.2 isn't possible due to locked bootloader?





  • Can I downgrade Android from 4.4.2 to 4.3?




  • Can I upgrade my ssh user account to be one level above "others", so as to have write and read permissions? Do I need root? Will that solve the problem, given the difference in read permissions between sftp from Nautilus and ssh and scp from terminal under the same ssh user?




I found a discussion at http://forum.xda-developers.com/google-nexus-5/general/sdcard-problems-upgrading-android-t2938749 , where the suggestions seem to require root, right? Thanks.




No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...