owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.38k stars 2.06k forks source link

Thumbnails in Android app don't work for (group) shared photos #24861

Closed gnuheidix closed 8 years ago

gnuheidix commented 8 years ago

Steps to reproduce

Preconditions

  1. There are two users registered. e.g. User A and User B
  2. Both are in the same group. e.g. user

    Reproduction

  3. User A: Create a folder, Share the folder with group user, Upload a photo into the folder
  4. User B: Access the folder using the owncloud-App
  5. User A: Access the folder using the owncloud-App

    Expected behaviour

    2) and 3) The thumbnail of the photo should be displayed after waiting some seconds.

    Actual behaviour

    2) No thumbnail gets displayed. - I haven't found a way for User B to get the thumbnail using the UI. 3) The thumbnail gets displayed.

    Server configuration

Operating system: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.4 LTS Release: 14.04 Codename: trusty

Web server: from default package source

$ nginx -V
nginx version: nginx/1.4.6 (Ubuntu)
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1) 
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_secure_link_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/headers-more-nginx-module --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-auth-pam --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-cache-purge --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-dav-ext-module --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-development-kit --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-echo --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/ngx-fancyindex --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-http-push --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-lua --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-upload-progress --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/nginx-upstream-fair --add-module=/build/nginx-BU0ZJt/nginx-1.4.6/debian/modules/ngx_http_substitutions_filter_module
$ dpkg -l | grep '^ii' | grep nginx
ii  nginx-common                        1.4.6-1ubuntu3.4                    all          small, powerful, scalable web/proxy server - common files
ii  nginx-extras                        1.4.6-1ubuntu3.4                    amd64        nginx web/proxy server (extended version)

Database: SQLite

$ echo '<?php echo phpinfo();' | php | grep -iA3 'sqlite3 support'
SQLite3 support => enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.8.2

PHP version: from default package source

$ php -v
PHP 5.5.9-1ubuntu4.17 (cli) (built: May 19 2016 19:05:57) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
$ dpkg -l | grep '^ii' | grep php
ii  php5-cli                            5.5.9+dfsg-1ubuntu4.17              amd64        command-line interpreter for the php5 scripting language
ii  php5-common                         5.5.9+dfsg-1ubuntu4.17              amd64        Common files for packages built from the php5 source
ii  php5-curl                           5.5.9+dfsg-1ubuntu4.17              amd64        CURL module for php5
ii  php5-fpm                            5.5.9+dfsg-1ubuntu4.17              amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php5-gd                             5.5.9+dfsg-1ubuntu4.17              amd64        GD module for php5
ii  php5-imagick                        3.1.2-1build1                       amd64        ImageMagick module for php5
ii  php5-json                           1.3.2-2build1                       amd64        JSON module for php5
ii  php5-readline                       5.5.9+dfsg-1ubuntu4.17              amd64        Readline module for php5
ii  php5-sqlite                         5.5.9+dfsg-1ubuntu4.17              amd64        SQLite module for php5

ownCloud version: (see ownCloud admin page) 9.0.2

Updated from an older ownCloud or fresh install: fresh

Where did you install ownCloud from: from official package source

$ dpkg -l | grep '^ii' | grep owncloud
ii  owncloud-files                      9.0.2-1.1                           all          ownCloud - Server

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - comments: 0.2
  - dav: 0.1.6
  - federatedfilesharing: 0.1.0
  - files: 1.4.4
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - encryption
  - external
  - federation
  - files_external
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "updatechecker": false,
        "instanceid": "oc12xc3y1vul",
        "trusted_domains": [
            "gnuheidix.de:9999"
        ],
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbtype": "sqlite3",
        "version": "9.0.2.2",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "root",
        "mail_smtpmode": "php",
        "mail_domain": "gnuheidix.de",
        "loglevel": 0
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

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

Client configuration

Browser:

ownCloud Android-App
Version 2.0.0

Operating system: Android 5.1.1

Logs

Web server error log

### not working - not directory owner, but group member of group "user" and the folder bcrm15 has been shared to group "user": 
anja [26/May/2016:12:18:06 +0200] "GET /index.php/apps/files/api/v1/thumbnail/128/128/Fotos/bcrm15/IMG_20151122_093447224.jpg HTTP/1.1" 404 6880 "-" "Mozilla/5.0 (Android) ownCloud-android/2.0.0"

### working - directory owner, group member of group "user" and the folder bcrm15 has been shared to group "user": 
heidi [26/May/2016:12:22:47 +0200] "GET /index.php/apps/files/api/v1/thumbnail/128/128/Fotos/bcrm15/IMG_20151122_093447224.jpg HTTP/1.1" 200 2733 "-" "Mozilla/5.0 (Android) ownCloud-android/2.0.0"

ownCloud log (data/owncloud.log)

### not working - see web server log - part 1
{"reqId":"DqL\/W2OViMVsKGoFTDLg","remoteAddr":"AN_IPV6_ADDRESS","app":"core","message":"Generating preview for \"files\/Fotos\/bcrm15\/IMG_20151122_093447224.jpg\" with \"OC\\Preview\\JPEG\"","level":0,"time":"2016-05-26T10:18:06+00:00","method":"GET","url":"\/index.php\/apps\/files\/api\/v1\/thumbnail\/128\/128\/Fotos\/bcrm15\/IMG_20151122_093447224.jpg","user":"anja"}
{"reqId":"DqL\/W2OViMVsKGoFTDLg","remoteAddr":"AN_IPV6_ADDRESS","app":"core","message":"OC_Image->fixOrientation() Image is not a JPEG.","level":0,"time":"2016-05-26T10:18:06+00:00","method":"GET","url":"\/index.php\/apps\/files\/api\/v1\/thumbnail\/128\/128\/Fotos\/bcrm15\/IMG_20151122_093447224.jpg","user":"anja"}
{"reqId":"DqL\/W2OViMVsKGoFTDLg","remoteAddr":"AN_IPV6_ADDRESS","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2016-05-26T10:18:06+00:00","method":"GET","url":"\/index.php\/apps\/files\/api\/v1\/thumbnail\/128\/128\/Fotos\/bcrm15\/IMG_20151122_093447224.jpg","user":"anja"}

Browser log

no client logs available
PVince81 commented 8 years ago

@georgehrke @oparoz @rullzer

georgehrke commented 8 years ago

So neither User 1 nor User 2 see the thumbnail in the app?

gnuheidix commented 8 years ago

User A, the one who created and shared the folder, and uploaded the file has working thumbnails in the app. User B, who just wants to access the pictures, has no working thumbnails.

I've just fixed a typo in my bug report. The enumeration in the topic Actual behavior was misleading.

gnuheidix commented 8 years ago

Thumbnails work now with Server version 9.0.3 and Android app version 2.0.1. I consider this issue fixed.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.