Error when i try to download folders

hosting

#1

When I try to download an entire folder the server returns the error message "File Cannot Be Read"


Exception trying to download folder
#2

Hey, i don't think that anyone can help here if you provide such minimal information. If i'm creating a new thread in this Server-Help category i get the following template presented which is probably the minimum of information you should provide:

<!--
Thanks for reporting issues back to ownCloud! This is the issue tracker of ownCloud, if you have any support question please check out https://owncloud.org/support

This is the bug tracker for the Server component. Find other components at https://github.com/owncloud/core/blob/master/.github/CONTRIBUTING.md#guidelines

For reporting potential security issues please see https://owncloud.org/security/

To make it possible for us to help you please fill out below information carefully.

Before reporting any issues please make sure that you're using the latest available version for your major branch (e.g. 9.0.x), see https://owncloud.org/changelog/
--> 
### Steps to reproduce
1.
2.
3.

### Expected behaviour
Tell us what should happen

### Actual behaviour
Tell us what happens instead

### Server configuration
**Operating system**:

**Web server:**

**Database:**

**PHP version:**

**ownCloud version:** (see ownCloud admin page)

**Updated from an older ownCloud or fresh install:**

**Where did you install ownCloud from:**

**Signing status (ownCloud 9.0 and above):**

```
Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.
```


**The content of config/config.php:**

```
Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.
```

**List of activated apps:**

```
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.
```

**Are you using external storage, if yes which one:** local/smb/sftp/...

**Are you using encryption:** yes/no

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

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

```
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
```

### Client configuration
**Browser:**

**Operating system:**

### Logs
#### Web server error log
```
Insert your webserver log here
```

#### ownCloud log (data/owncloud.log)
```
Insert your ownCloud log here
```

#### Browser log
```
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
```

#3

Steps to reproduce

  1. Visit my OwnCloud File page
  2. try to download an entire folder usind "Download" Button ("Scarica" in my italian version)

Expected behaviour

Download the entire folder with all documents and files

Actual behaviour

Page Redirect with an error message : File cannot be read

Server configuration

Operating system: Server Linux (Hosting Linux - Aruba.it)

Database: MySQL 5.5.59-38.11-log

PHP version: 5.4.16

ownCloud version: ownCloud 10.0.7 (stable)

Updated from an older ownCloud or fresh install: Updated to OwnCloud 10 - But I noticed the problem also before updating

Where did you install ownCloud from: Used the official package and uploaded by using ftp connection


#4

I think more details like logfiles shown in the template are required as well.


#5
{"reqId":"WuL31gQ5zNVy-CKLFa77kQAAAAA","level":0,"time":"2018-04-27T10:13:43+00:00","remoteAddr":"79.20.113.186","user":"segreteria","app":"no app in context","method":"GET","url":"\/cloud\/index.php\/apps\/gallery\/config?extramediatypes=1","message":"CSRF check failed"}
{"reqId":"WuL32QQ5zNVy-CKLFa77kgAAAAA","level":0,"time":"2018-04-27T10:13:46+00:00","remoteAddr":"79.20.113.186","user":"segreteria","app":"webdav","method":"PROPFIND","url":"\/cloud\/remote.php\/webdav\/","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 CSRF check not passed.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(150): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->auth(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(201): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(150): Sabre\\\\DAV\\\\Auth\\\\Plugin->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#5 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#6 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(63): Sabre\\\\DAV\\\\Server->exec()\\n#8 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/remote.php(165): require_once('\\\/web\\\/htdocs\\\/www...')\\n#9 {main}\",\"File\":\"\\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php\",\"Line\":215,\"User\":\"segreteria\"}"}
{"reqId":"WuL331c3dyqh7MYIEefF5AAAAAY","level":0,"time":"2018-04-27T10:13:52+00:00","remoteAddr":"79.20.113.186","user":"segreteria","app":"webdav","method":"PROPFIND","url":"\/cloud\/remote.php\/webdav\/","message":"Exception: {\"Message\":\"HTTP\\\/1.1 401 CSRF check not passed.\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Code\":0,\"Trace\":\"#0 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(150): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->auth(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(201): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(150): Sabre\\\\DAV\\\\Auth\\\\Plugin->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 [internal function]: Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#5 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#6 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(63): Sabre\\\\DAV\\\\Server->exec()\\n#8 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/remote.php(165): require_once('\\\/web\\\/htdocs\\\/www...')\\n#9 {main}\",\"File\":\"\\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php\",\"Line\":215,\"User\":\"segreteria\"}"}
{"reqId":"WuL5APKP6MT4pgR9NPkUEgAAAAM","level":3,"time":"2018-04-27T10:18:42+00:00","remoteAddr":"79.20.113.186","user":"segreteria","app":"no app in context","method":"GET","url":"\/cloud\/index.php\/apps\/files\/ajax\/download.php?dir=%2F&files=Fogli%20Settimana&downloadStartSecret=i1cbmzwbh7l","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"Unable to send file Fogli%20Settimana.tar. HTML Headers have already been sent from \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/deepdiver1975\\\/tarstreamer\\\/src\\\/TarStreamer.php in line 30\",\"Code\":0,\"Trace\":\"#0 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/private\\\/Streamer.php(54): ownCloud\\\\TarStreamer\\\\TarStreamer->sendHeaders('Fogli Settimana...')\\n#1 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/private\\\/legacy\\\/files.php(147): OC\\\\Streamer->sendHeaders('Fogli Settimana')\\n#2 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/apps\\\/files\\\/ajax\\\/download.php(68): OC_Files::get('\\\/', 'Fogli Settimana', Array)\\n#3 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/private\\\/Route\\\/Route.php(155): require_once('\\\/web\\\/htdocs\\\/www...')\\n#4 [internal function]: OC\\\\Route\\\\Route->OC\\\\Route\\\\{closure}(NULL)\\n#5 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): call_user_func(Object(Closure), Array)\\n#6 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/base.php(913): OC\\\\Route\\\\Router->match('\\\/apps\\\/files\\\/aja...')\\n#7 \\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/index.php(55): OC::handleRequest()\\n#8 {main}\",\"File\":\"\\\/web\\\/htdocs\\\/www.parrocchialuragomarinone.it\\\/home\\\/cloud\\\/lib\\\/composer\\\/deepdiver1975\\\/tarstreamer\\\/src\\\/TarStreamer.php\",\"Line\":46}"}
{"reqId":"WuL5An5pE9h@31ZzoxN4lgAAAAU","level":0,"time":"2018-04-27T10:18:43+00:00","remoteAddr":"79.20.113.186","user":"segreteria","app":"no app in context","method":"GET","url":"\/cloud\/index.php\/apps\/gallery\/config?extramediatypes=1","message":"CSRF check failed"}

Here some few lines of the log file. I try to download a folder just before saving log file so i think that the last two line are the most useful in order to understand the problem


#6

Yes, those looks to me related to your issue.


#7

Yes! But I have no idea about a possible solution


#8

what version were you on when the problem first occurred?

also how did you install ownCloud? What manual did you use or what how-to?


#9

It was OwnCloud 9

I have installed OwnCloud uploading the files composing zip packet throw ftp connection on my hosting area folder. I can't use command line or other ways because of my Hosting Area restrictions...

Also updates were done in this way.


#10

That limits the ways you can debug your issue. I suspect a permissions issue, but you have to have a ssh connection to make the "ls /var/www/owncloud/" command


#11

Re-set permission with FileZilla could solve the problem?


#12

I don't know if you can do this in FileZilla.

You would have to give the web server user the ownership of the owncloud folder and the sub directories.


#13

With changing permission with FileZilla I mean use this menu

I don't know if it's what you mean too


#14

No, this is where you set the read write execute permission.

What you need is to set the web server user "www-data" as the owner of "owncloud"


#15

And are there no other ways to repair this permission without command line?


#16

Not as far as I know