Download txt files with encryptet content

Steps to reproduce

  1. Upload txt file with encrypted content in external store
  2. log in in Owncloud Webinterface
  3. go to the folder in Files context and via details download
    Message Forbidden 403 You don’t have permission to access /remote.php/webdav/on this server.
    when i renamed the fileextention to other then txt (.dat) the download works perfect. Rename also to txt and the error page came Forbidden 403 up

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system: ubuntu

**Web server:**Ubuntu 18.04.3 LTS

Database: MariaDB

PHP version: PHP 7.2.19-0ubuntu0.18.04.2

ownCloud version: 10.2.1 (stable)

Updated from an older ownCloud or fresh install: updated

Where did you install ownCloud from: source

Signing status (ownCloud 9.0 and above):

No errors have been found

The content of config/config.php:
{
“system”: {
“updatechecker”: false,
“instanceid”: “ochdpe0r5nfn”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“172.16.1.159”,
“mhlcloud.mds.local”,
cloud.mhl.de”,
mandantenportal.mhl.de”,
mandantenportal.crowe-mhl.de”,
cloud.crowe-mhl.de”,
“172.16.1.156”,
“172.16.6.167”
],
“datadirectory”: “/var/www/owncloud/data”,
“overwrite.cli.url”: “http://mhlcloud.mds.local/owncloud”,
“dbtype”: “mysql”,
“version”: “10.2.1.4”,
“dbname”: “owncloud”,
“dbhost”: “127.0.0.1”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “UTC”,
“installed”: true,
“theme”: “MHL”,
“enable_avatars”: false,
“knowledgebaseenabled”: false,
“ldapIgnoreNamingRules”: false,
“mail_smtpmode”: “smtp”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “25”,
“maintenance”: false,
“filelocking.ttl”: 3600,
“mysql.utf8mb4”: true,
“debug”: false,
“loglevel”: 2,
“mail_smtpdebug”: false
}
}

List of activated apps:

Enabled:
  - activity: 2.5.0
  - comments: 0.3.0
  - configreport: 0.2.0
  - dav: 0.4.0
  - federatedfilesharing: 0.4.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_pdfviewer: 0.11.0
  - files_sharing: 0.11.0
  - files_texteditor: 2.3.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.10.1
  - firstrunwizard: 1.2.0
  - gallery: 16.1.1
  - market: 0.5.0
  - notifications: 0.5.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.4.0
  - updatenotification: 0.2.1
  - user_ldap: 0.13.0
Disabled:
  - encryption
  - external
  - user_external


**Are you using external storage, if yes which one:**smb

**Are you using encryption:** no

**Are you using an external user-backend, if yes which one:** ActiveDirectory

#### LDAP configuration (delete this part if not used)

+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                                                      |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                                                        |
| hasPagedResultSupport         |                                                                                                                                          |
| homeFolderNamingRule          |                                                                                                                                          |
| lastJpegPhotoLookup           | 0                                                                                                                                        |
| ldapAgentName                 | +++deleted+++                                                |
| ldapAgentPassword             | ***                                                                                                                                      |
| ldapAttributesForGroupSearch  |                                                                                                                                          |
| ldapAttributesForUserSearch   |                                                                                                                                          |
| ldapBackupHost                |                                                                                                                                          |
| ldapBackupPort                |                                                                                                                                          |
| ldapBase                      | DC=mds,DC=local                                                                                                                          |
| ldapBaseGroups                | DC=mds,DC=local                                                                                                                          |
| ldapBaseUsers                 | DC=mds,DC=local                                                                                                                          |
| ldapCacheTTL                  | 600                                                                                                                                      |
| ldapConfigurationActive       | 1                                                                                                                                        |
| ldapDynamicGroupMemberURL     |                                                                                                                                          |
| ldapEmailAttribute            |                                                                                                                                          |
| ldapExperiencedAdmin          | 0                                                                                                                                        |
| ldapExpertUUIDGroupAttr       |                                                                                                                                          |
| ldapExpertUUIDUserAttr        | objectguid                                                                                                                               |
| ldapExpertUsernameAttr        |                                                                                                                                          |
| ldapGroupDisplayName          | cn                                                                                                                                       |
| ldapGroupFilter               | (|(cn=org-b-AbtWPGes))                                                                                                                   |
| ldapGroupFilterGroups         | org-b-AbtWPGes                                                                                                                           |
| ldapGroupFilterMode           | 0                                                                                                                                        |
| ldapGroupFilterObjectclass    |                                                                                                                                          |
| ldapGroupMemberAssocAttr      | uniqueMember                                                                                                                             |
| ldapHost                      | +++deleted+++                                                                                                                             |
| ldapIgnoreNamingRules         |                                                                                                                                          |
| ldapLoginFilter               | (&(&(|(objectclass=person)))(samaccountname=%uid))                                                                                       |
| ldapLoginFilterAttributes     |                                                                                                                                          |
| ldapLoginFilterEmail          | 0                                                                                                                                        |
| ldapLoginFilterMode           | 0                                                                                                                                        |
| ldapLoginFilterUsername       | 1                                                                                                                                        |
| ldapNestedGroups              | 0                                                                                                                                        |
| ldapOverrideMainServer        |                                                                                                                                          |
| ldapPagingSize                | 500                                                                                                                                      |
| ldapPort                      | 389                                                                                                                                      |
| ldapQuotaAttribute            |                                                                                                                                          |
| ldapQuotaDefault              |                                                                                                                                          |
| ldapTLS                       | 0                                                                                                                                        |
| ldapUserDisplayName           | displayName                                                                                                                              |
| ldapUserDisplayName2          |                                                                                                                                          |
| ldapUserFilter                | (&(|(objectclass=person)(objectclass=user))(|(|(memberof=CN=+++deleted+++)(primaryGroupID=1627)))) |
| ldapUserFilterGroups          | org-a-mds                                                                                                                                |
| ldapUserFilterMode            | 0                                                                                                                                        |
| ldapUserFilterObjectclass     | person;user                                                                                                                              |
| ldapUserName                  | samaccountname                                                                                                                           |
| ldapUuidGroupAttribute        | auto                                                                                                                                     |
| ldapUuidUserAttribute         | auto                                                                                                                                     |
| turnOffCertCheck              | 0                                                                                                                                        |
| useMemberOfToDetectMembership | 1                                                                                                                                        |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+


### Client configuration
**Browser:** Firefox 68.2.0esr

**Operating system:** Windows 10

### Logs
#### Web server error log

log extract for failed download
172.16.0.42 - - [15/Jan/2020:15:44:20 +0100] “GET /remote.php/webdav/MHL/PA/Abt.%20Scharfenberg/354930%20-%20Wentzel%20Dr_2/Lohn/2019%20Lohn/12.2019/54940%20IM%20-%20Test-TFr/54940.%20PMSExport.txt?downloadStartSecret=f6dtelduw88 HTTP/1.1” 200 130016 “-” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0”

log extract for sucessfully download
172.16.0.42 - - [15/Jan/2020:15:45:06 +0100] “GET /remote.php/dav/files/admin/MHL/PA/Abt.%20Scharfenberg/354930%20-%20Wentzel%20Dr_2/Lohn/2019%20Lohn/12.2019/54940%20IM%20-%20Test-TFr/54940.%20PMSExport.dat?c=5e1f094d352d0&x=32&y=32&forceIcon=0&preview=1 HTTP/1.1” 404 8895 “-” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0”
172.16.0.42 - - [15/Jan/2020:15:45:10 +0100] “GET /remote.php/webdav/MHL/PA/Abt.%20Scharfenberg/354930%20-%20Wentzel%20Dr_2/Lohn/2019%20Lohn/12.2019/54940%20IM%20-%20Test-TFr/54940.%20PMSExport.dat?downloadStartSecret=xli5gbygvtn HTTP/1.1” 200 130053 “-” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0”


#### ownCloud log (data/owncloud.log)

nothing to log


#### Browser log

a) The javascript console log
b) The network log
c) …

Hi Frisoft,

please set the loglevel in your config.php to 0 (zero), repeat the download of the encrypted file and post the resulting log entries here.
The provided Apache logs are inconclusive.

Kind regards,

Cornelius

2 Likes

Hey,

i think it could also make sense to use a more up to date version of ownCloud like 10.3.2 or even wait for 10.4.0 to rule out that this issue is caused by an outdated version of ownCloud.