Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No activity-notification upon upload to publicly shared folder #41

Closed
umgfoin opened this issue Sep 9, 2016 · 7 comments
Closed

No activity-notification upon upload to publicly shared folder #41

umgfoin opened this issue Sep 9, 2016 · 7 comments

Comments

@umgfoin
Copy link

umgfoin commented Sep 9, 2016

Steps to reproduce

  1. Enable activity (stream + mail) for file or folder creation
  2. Create publicly shared folder with write-access and hidden file-list
  3. Upload a file to this folder

Expected behaviour

New record of file-creation in activity stream and generation of notification email.

Actual behaviour

File is uploaded correctly, but neither notification is triggered.

Server configuration

Operating system:
CENTOS 6

Web server:
Apache/2.2.15 + nginx/1.11.1

Database:
Postgres 9.5

PHP version:
PHP-FPM 7.0.9

Nextcloud version: (see Nextcloud admin page)
10.0 (stable)

Where did you install Nextcloud from:
Archive

Signing status:

Integrity checker has been disabled. Integrity cannot be verified.

List of activated apps:

  - activity: 2.3.2
  - admin_audit: 1.0.0
  - announcementcenter: 2.0.0-RC1
  - bookmarks: 0.9.0
  - calendar: 1.3.3
  - comments: 1.0.0
  - contacts: 1.4.0.0
  - dav: 1.0.0
  - direct_menu: 0.9.2
  - documents: 0.13.1
  - external: 1.2
  - federatedfilesharing: 1.0.1
  - federation: 1.0.1
  - files: 1.5.2
  - files_accesscontrol: 1.1.2
  - files_automatedtagging: 1.1.1
  - files_external: 1.0.2
  - files_gpxviewer_extended: 1.5
  - files_mv: true
  - files_pdfviewer: 0.8.1
  - files_reader: 0.7.2
  - files_retention: 1.0.0
  - files_sharing: 1.0.0
  - files_texteditor: 2.1
  - files_trashbin: 1.0.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - galleryplus: 15.1.1
  - gpxpod: 1.0.3
  - html5_videoplayer: 1.0
  - logreader: 1.1.5
  - notes: 2.0.2
  - notifications: 0.3.0
  - ownnote: 1.08
  - password_policy: 1.0.0
  - serverinfo: 1.1.1
  - survey_client: 0.1.5
  - systemtags: 1.0.2
  - templateeditor: 0.1
  - theming: 1.0.1
  - updatenotification: 1.0.1
  - workflowengine: 1.0.1

The content of config/config.php:

$CONFIG = array (
  'instanceid' => '123456789',
  'passwordsalt' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'fqdn',
    1 => 'fqdn',
  ),
  'datadirectory' => '/mnt/cloud/data',
  'overwrite.cli.url' => 'https://fqdn',
  'session_lifetime' => 600,
  'session_keepalive' => true,
  'dbtype' => 'pgsql',
  'version' => '9.1.0.16',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'topsecret',
  'installed' => true,
  'forcessl' => true,
  'loglevel' => 0,
  'log_rotate_size' => true,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'info',
  'mail_domain' => 'fqdn',
  'mail_smtphost' => '127.0.0.1',
  'mail_smtpport' => '25',
  'theme' => '',
  'updatechecker' => true,
  'has_internet_connection' => true,
  'check_for_working_htaccess' => true,
  'check_for_working_webdav' => true,
  'integrity.check.disabled' => true,
  'appcodechecker' => false,
  'appstoreenabled' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'trashbin_retention_obligation' => 'auto',
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\MP3',
    6 => 'OC\\Preview\\TXT',
    7 => 'OC\\Preview\\MarkDown',
    8 => 'OC\\Preview\\SVG',
    9 => 'OC\\Preview\\TIFF',
    10 => 'OC\\Preview\\Font',
  ),
  'appstore.experimental.enabled' => true,
  'htaccess.RewriteBase' => '/',
  'updater.release.channel' => 'stable',
);

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

Client configuration

Any

Operating system:
WIN/OSX/LINUX

Logs

Nextcloud log (data/nextcloud.log)

n.a. (no entry)

Browser log

n.a.
@nickvergessen
Copy link
Member

This works in 11.0.2 and later

@umgfoin
Copy link
Author

umgfoin commented Feb 13, 2017

Hi nickvergessen,
negative: Just verified with 11.0.2 RC1:
No notification received after anonymous or authentificated user uploads to public shared folder (via public link).
bg umgfoin.

@nickvergessen
Copy link
Member

I just tested this again and it works fine. However it requires changes in multiple parts. So make sure you updated all parts (server and all the shipped apps)

@umgfoin
Copy link
Author

umgfoin commented Feb 14, 2017

Joas,
server was updated by updater-app.
No pending apps-updates visible.
Activity is v2.4.1
I'm seeing one related (?) issue in the logs:

{"reqId":"**hidden**","remoteAddr":"**hidden**","app":"no app in context","message":"Exception: {\"Exception\":\"OC\\\\User\\\\NoUserException\",\"Message\":\"Attempted to initialize mount points for null user and no user in session\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/apps\\\/activity\\\/lib\\\/FilesHooks.php(527): OC\\\\Files\\\\Filesystem::initMountPoints(false)\\n#1
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/apps\\\/activity\\\/lib\\\/FilesHooks.php(161): OCA\\\\Activity\\\\FilesHooks->getSourcePathAndOwner('\\\/AEGAEON\\\/PUBLIC...')\\n#2
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/apps\\\/activity\\\/lib\\\/FilesHooks.php(119): OCA\\\\Activity\\\\FilesHooks->addNotificationsForFileAction('\\\/AEGAEON\\\/PUBLIC...', 'file_created', '', 'created_public')\\n#3
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/apps\\\/activity\\\/lib\\\/FilesHooksStatic.php(45): OCA\\\\Activity\\\\FilesHooks->fileCreate('\\\/AEGAEON\\\/PUBLIC...')\\n#4
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/lib\\\/private\\\/legacy\\\/hook.php(106): OCA\\\\Activity\\\\FilesHooksStatic::fileCreate(Array)\\n#5 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(283): OC_Hook::emit('OC_Filesystem', 'post_create', Array)\\n#6
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(215): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->emitPostHooks(false)\\n#7
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(137): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #418)\\n#8
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1072): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('folder.jpg', Resource id #418)\\n#9
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile('folder.jpg', Resource id #418, NULL)\\n#10 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#11
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#12
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#13
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#14
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/publicwebdav.php(104): Sabre\\\\DAV\\\\Server->exec()\\n#15
 \\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/public.php(77): require_once('\\\/var\\\/www\\\/vhosts...')\\n#16
 {main}\",\"File\":\"\\\/var\\\/www\\\/vhosts\\\/**hidden**\\\/**hidden**\\\/lib\\\/private\\\/Files\\\/Filesystem.php\",\"Line\":399}","level":3,"time":"2017-02-14T12:22:24+00:00","method":"PUT","url":"\/public.php\/webdav\/folder.jpg","user":"--","version":"11.0.2.0"}
{"reqId":"**hidden**","remoteAddr":"**hidden**","app":"admin_audit","message":"File created: \"\/**hidden**\/PUBLIC UPLOAD\/\/folder.jpg\"","level":1,"time":"2017-02-14T12:22:24+00:00","method":"PUT","url":"\/public.php\/webdav\/folder.jpg","user":"--","version":"11.0.2.0"}
{"reqId":"**hidden**","remoteAddr":"**hidden**","app":"admin_audit","message":"File written to: \"\/**hidden**\/PUBLIC UPLOAD\/\/folder.jpg\"","level":1,"time":"2017-02-14T12:22:25+00:00","method":"PUT","url":"\/public.php\/webdav\/folder.jpg","user":"--","version":"11.0.2.0"}

PUBLIC_UPLOAD resides on an external SMB-share.
Any ideas?

@nickvergessen
Copy link
Member

External storage might be the cause here.
Will test later

@umgfoin
Copy link
Author

umgfoin commented Feb 14, 2017

Thanks for the hint.

Confirmed:
Notifications work for "native" nextcloud-folders (within the nextcloud-data-path)
but fail for shared folders on external storage.

Verified for:

  • local (external server-local mounted folders)
  • SMB (CIFS to localhost)
  • Dropbox

@umgfoin
Copy link
Author

umgfoin commented Feb 17, 2017

Issue exists with 11.0.2 RC2, too.
Should I report to /nextcloud/server or is this the right place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants