"Permission Denied" when uploading from Android Client, but fine using Windows Client

Nextcloud version: 18.0.5 and 19.0.0
Operating system and version: Linux 3.10.0-1062.18.1.el7.x86_64 x86_64
Apache or nginx version : ??
PHP version: 7.3.18

The issue you are facing:

My web hoster recently moved me to a dedicated VM from a shared one so I’m guessing there is a config error but I’m not sure as:

  • OK : Creating, deleting, downloading files is fine from my Win10 PC using the Win10 Nextcloud App
  • OK: Creating Folders, deleting & downloading files is fine from my phone using the Nexcloud App
  • Fail: Uploading Files using the Nextcloud App. The file upload itself works fine, but a few seconds after 100% uploaded I get “You are not permitted to upload to this folder” and the upload items shows as failed and “Permission Denied”.

I’m not sure why it would be fine from my PC but not from my phone. I’ve had a look at some logs and do find some entries like:

Thu Jun 04 23:02:28.952824 2020] [core:crit] [pid 597] (13)Permission denied: [client xxx.xxx.xxx.xxx:12345] AH00529: /home/me/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/me/public_html/' is executable

Thanks
Nathan

Apologies for the bump, but I’m not sure how to resolve this.
Thanks
Nathan

have you tried to solve this error already?
have you tried reinstalling android-app?

Thanks for the reply Jimmy,

  • I have installed/uninstalled/reinstalled the Android App many times.
  • I have tried changing the the .htaccess file in both public_html and under public_html/nextcloud from 644 to 755

No issues from the Windows Client, just the Android App.

Apologies for the bump. I’ve done some more testing:

  • iPhone App: No Issues
  • Win10 Desktop App: No Issues
  • Android App: I’ve now tested on 2 x phones and both fails the same way.

I don’t understand why the Android App fails…

Hi @jmone,

It might be best to raise an issue on the guthub tracker https://github.com/nextcloud/android/issues/new/choose

@jmone as @Andy is Android app dev I think that his request for filing a GH-Issue would mark a solution regarding the forum. Meaning there’s nothing that could be done here.

Please don’t forget to re-link your issue as an answer to this thread… :wink:

@JimmyKater @Andy - I’ve created the ticket here - https://github.com/nextcloud/android/issues/6570

Thanks
Nathan

1 Like

Commenting to add what helped me since there was little online about this.

  1. Files I added to Nextcloud/data somehow had the wrong owner, not www-data but my main Linux user name. chown the whole folder to be sure and could upload from the Android client

  2. I had some TWRP files (Android backup utility) I couldn’t delete from the Android client but that seemed to be specific to those files, no idea why because I could delete other files. Removed the from terminal in Linux and good to go.

Thanks - I don’t even have a www-data user or group on this system. The service provider had migrated my Nextcloud instances from a shared to dedicated VM, so I’m guessing the ownership changed at that point.

Before I go back to tech support, can I confirm what folders need to have the ownership modified on them, as everything currently works except for Android Uploads, and is the ownership to be “www-data” or is it dependant on the OS or the ownership of the webservice?

Thanks
Nathan

Depends on your set up, pretty sure. I followed this guide - https://pimylifeup.com/raspberry-pi-nextcloud-server/

I had to create the user and make it the owner of the data folder but the data folder can be whatever you want.