0

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 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?

  • can we make sftp in Nautilus work in the same way as ssh and scp in terminal to read and write the content of /sdcard?

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.

  • can't this be a problem of access rights? What are the ACL on the directory and what is the user you are connecting to? – Jakuje Aug 30 '15 at 7:40
  • @Jakuje: I checked the access rights of /sdcard's content, and "others" doesn't have read permission. I tried to change that by chmod, but got "Bad mode` error. Is it due to the upgrade of Android from 4.3 to 4.4.2? – Tim Aug 30 '15 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.