MaterialFiles icon indicating copy to clipboard operation
MaterialFiles copied to clipboard

Can not access subfolders on remote webdav storage

Open ippocratis opened this issue 2 years ago • 2 comments

Probably becouse of this https://github.com/zhanghai/MaterialFiles/issues/95#issuecomment-881699786

So I exposed a remote webdav storage in storage access framework using a Foss app "webdav provider" https://github.com/alexbakker/webdav-provider Then added the remote to material files using the add storage > external storage feature

I can see the root folders and open them but if I open any sunflower in them I get java8.nio.file.accessDeniedException

I'm on an android 12 custom rom with microg and v1.4.2

Log

<<< log_count = 17 >>>
[04-23 12:30:16.689 1512:3608 I/ActivityTaskManager]
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=me.zhanghai.android.files/.filelist.FileListActivity bnds=[135,1512][339,1744]} from uid 10184

[04-23 12:30:16.868 23048:23075 D/MeasurementService]
bound by: GetServiceRequest{serviceId=MEASUREMENT, gmsVersion=12451000, packageName='me.zhanghai.android.files', extras=Bundle[{}]}

[04-23 12:30:16.874 23048:28715 D/MeasurementService]
f10(3567385392839365084, null, FileListActivity, me.zhanghai.android.files)

[04-23 12:30:18.431 11640:11640 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/photos/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:27.275 11640:13711 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/documents/%20anytime/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:27.279 11640:11640 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/documents/%20anytime/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:33.690 11640:13711 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/dav/data/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:33.691 11640:11640 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/dav/data/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:37.865 11640:13716 W/System.err]
me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/kido/%0AKubo%20and%20the%20Two%20Strings%20(2016)%20.mp4 is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:37.868 11640:13716 W/System.err]
me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/kido/%0AKubo%20and%20the%20Two%20Strings%20(2016)%20.mp4 is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:45.423 11640:13713 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/backup/bot1/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:45.429 11640:11640 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/backup/bot1/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:46.773 11640:13718 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/backup/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:46.774 11640:11640 W/System.err]
Caused by: me.zhanghai.android.files.provider.content.resolver.ResolverException: java.lang.SecurityException: Document /6192f723-32e8-44b8-a73f-e62da0fbe647/backup/ is not a descendant of /6192f723-32e8-44b8-a73f-e62da0fbe647/

[04-23 12:30:50.280 23048:23075 D/MeasurementService]
bound by: GetServiceRequest{serviceId=MEASUREMENT, gmsVersion=12451000, packageName='me.zhanghai.android.files', extras=Bundle[{}]}

[04-23 12:30:50.330 23048:23075 D/MeasurementService]
f1(com.google.android.gms.measurement.internal.EventParcel@1e30d8b) for AppMetadata[me.zhanghai.android.files]

[04-23 12:30:50.331 23048:23075 D/MeasurementService]
f10(0, null, null, me.zhanghai.android.files)

ippocratis avatar Apr 23 '22 09:04 ippocratis

The SecurityException is thrown by the DocumentsProvider - could you tell me more about why you think this is related to https://github.com/zhanghai/MaterialFiles/issues/95#issuecomment-881699786?

Meanwhile, the exception is likely thrown from DocumentsProvider.enforceTree(), so it's likely that the app you are using didn't properly implement DocumentsProvider.isChildDocument().

zhanghai avatar Apr 23 '22 19:04 zhanghai

@zhanghai I guess you are right used rcx as a webdav provider and I can access subfolders without errors Sometimes material files displays folders as empty thouth

ippocratis avatar Apr 25 '22 15:04 ippocratis