Owner of file inside a shared folder

Nextcloud version (eg, 20.0.5): 23.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4

The issue you are facing:

When user A shares a folder with user B, all files created by user B appear to be owned by user A. I can’t find any indication that these files were created by user B.

Is this the first time you’ve seen this error? (Y/N): I’m relatively new to Nextcloud, so Yes, it’s the first time I see it, but no, I’ve never seen it work any other way before.

Steps to replicate it:

  1. Logon as user A. Create a folder. Share it with user B.
  2. Logon as user B. Create a file inside the folder.
  3. As user B, look at the folder contents. Ask to see the “details” of the file.

Result: The file seems to belong to user A. Under “sharing”, it says “Shared with you by user A”. There is no indication that the file was created by user B.

In addition (not certain whether it’s related), if any user modifies the file, the only user who gets a notification is user A (the owner). Is it possible to have a group of people (e.g. a circle) being notified whenever a file is modified? We couldn’t find a way to do so.

The output of your Nextcloud log in Admin > Logging:

It’s huge (30M). Is all of it needed?

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxxxxxxxxxxxx',
  ),
  'datadirectory' => '/var/www/xxxxxxxxxxxxxxxx/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '23.0.2.1',
  'overwrite.cli.url' => 'https://xxxxxxxxxxxxxxxxx/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => 'xxxxxxxxxxxxxxx',
  'installed' => true,
  'instanceid' => 'ocw29aqceecj',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'default_phone_region' => 'GR',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'app_install_overwrite' => 
  array (
    0 => 'jitsi',
    1 => 'apporder',
  ),
  'maintenance' => false,
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'mail_domain' => 'xxxxxxxxxxxx',
  'htaccess.RewriteBase' => '/',
  'updater.secret' => 'xxxxxxxxxxxxxxxxxxxxx',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

I don’t think there’s anything relevant there.

So far I see everything is right… we had lengish discussion here how and why, but in short my 2ct:

  • folder owned by a person X (or group folder) = owner
  • contains files owned by a person X = owner
  • independent who was the creator of the file

this is logical/safe way to organize ownership - otherwise it would be almost impossible to keep track of quotas - which quota should be billed if the file in the folder of A is owner by B? how should you find all the files owner by the user you going to remove? what is if the file is uploaded by a guest?

I feel this little sad you don’t see who has created the file - I didn’t check so far but activity and audit log might store this data…

If have check it. On one of my Nextcloud (22.2.5) i can find the activity at both users in activity log. For activity in group folders read this.