Bug 377047 - SFTP: All file is owned by root
Summary: SFTP: All file is owned by root
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-01 07:21 UTC by Yuxuan Shui
Modified: 2019-07-19 21:58 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuxuan Shui 2017-03-01 07:21:12 UTC
In the mounted file system, all files are owned by root, and is not writable by the user.
Comment 1 Albert Vaca Cintora 2017-03-02 11:38:47 UTC
Are you talking about the root directory ("/") or a writable location like the sdcard on your phone? It is expected that you don't have write access to files that you don't have access normally on your phone.
Comment 2 Yuxuan Shui 2017-03-02 11:59:05 UTC
(In reply to Albert Vaca from comment #1)
> Are you talking about the root directory ("/") or a writable location like
> the sdcard on your phone? It is expected that you don't have write access to
> files that you don't have access normally on your phone.

I'm talking about the sdcard/storage location (e.g. /sdcard/emulated/0), which I have write access to on my phone.
Comment 3 Dani 2017-05-05 17:52:03 UTC
Can confirm that all files appear as owned by root in the connected KDE system:

Terminal emulator in Phone:
u0_a145@g3:/storage/external_SD/Android/data/net.osmand/files/tracks $ ls -l
-rwxrwx--- u0_a155  sdcard_r     2130 2016-09-10 22:59 circuit de lesquillon.gpx
drwxrwx--- u0_a155  sdcard_r          2017-05-05 16:14 rec
-rwxrwx--- u0_a155  sdcard_r      743 2017-05-05 15:04 test.gpx
u0_a145@g3:/storage/external_SD/Android/data/net.osmand/files/tracks $

Shell in connected KDE system:
dani@setna:~/.config/kdeconnect/60ca260263df1100/kdeconnect_sftp/60ca260263df1100/storage/external_SD/Android/data/net.osmand/files/tracks
$ ls -l
total 8
-rw------- 1 root root 2130 sep 10  2016 circuit de lesquillon.gpx
drwx------ 1 root root    0 may  5 16:14 rec
-rw------- 1 root root  743 may  5 15:04 test.gpx
Comment 4 Valerio Pilo 2017-06-25 21:56:12 UTC
Same issue here, LG G3 (d855) running latest LineageOS, full permissions granted to the app, and with on the other side a PC with an updated Neon user (the same issue occurs with Kubuntu 16.04 on another laptop).

In my case, the files/dirs in the SDcard are listed as not writable, and even as root I can not write any change to that FS:

> vale@Gatsu:~/.config/kdeconnect/fba3e36ee035c1b4/kdeconnect_sftp/fba3e36ee035c1b4/storage/5255-1406
> 23:46-$ la
> total 1.4G
> -r-------- 1 root root 547K Mar 29 12:24 addonsu-arm-signed.zip

On the other hand, the contents of the phone's internal storage are listed as writable, and are writable as normal user even if listed as being root-owned:

> vale@Gatsu:~/.config/kdeconnect/fba3e36ee035c1b4/kdeconnect_sftp/fba3e36ee035c1b4/storage/emulated/0
> 23:47-$ ls -la
> total 8
> drwx------ 1 root root  0 Jan 14  1970 Alarms
> drwx------ 1 root root  0 Apr 12 09:44 Android

I have this relevant line from mount:

kdeconnect@192.168.1.8:/ on /home/vale/.config/kdeconnect/fba3e36ee035c1b4/kdeconnect_sftp/fba3e36ee035c1b4 type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
Comment 5 Erik Duisters 2019-07-19 21:58:01 UTC
This problem was fixed by commit: 0b3f0acde52d66bc86d50f2c8b215b78e5e127be