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

Advanced Permissions cause error with occ files:scan #2844

Open
github-cli opened this issue Mar 4, 2024 · 1 comment
Open

Advanced Permissions cause error with occ files:scan #2844

github-cli opened this issue Mar 4, 2024 · 1 comment
Labels
0. Needs triage Issues that need to be triaged bug feature: acl Items related to the groupfolders ACL or "Advanced Permissions" feature: occ Items related to the OCC CLI interface

Comments

@github-cli
Copy link

github-cli commented Mar 4, 2024

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Create a Group Folder
  2. Assign Groups which have access (admin, Family, Users, ReadOnly)
  3. For all groups, allow all permissions (as per the documentation, denies cannot be changed into permits if set on the group folder settings)
  4. Go to advanced permissions of the main group folder and deny write/create/delete
  5. Change only one of the subfolders advanced permissions and allow everyhing for that one subfolder

Expected behaviour

No errors

Actual behaviour

occ files:scan creates an error (see logs)

The error does not appear if the group folders settings are set to deny everything in the first place but overriding the permissions and explicitly denying seems to be a problem

Server configuration

Operating system:
Description: Ubuntu 22.04.4 LTS
Docker version 25.0.3, build 4debf41
Docker Compose version v2.20.3

Web server:
Nginx

Database:
Postgresql-14
redis

PHP version:
8.2

Nextcloud version: (see Nextcloud admin page)
28.0.3

Group folders version:
16.0.4

Updated from an older Nextcloud/ownCloud or fresh install:
long path of upgrades, coming all the way from the officiel Nextcloud VM to Docker

Where did you install Nextcloud from:
Docker image
lscr.io/linuxserver/nextcloud:version-28.0.3

Are you using external storage, if yes which one: local/s3/smb/sftp/...
yes, local storage (internal disk) with ext4

Are you using encryption: yes/no
no

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

Client configuration

Browser:
N/A but Chrome

Operating system:
Ubuntu 22.0.4

Logs

OCC error log

occ files:scan error output
Exception during scan: An exception occurred while executing a query: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block
#0 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(328): OC\DB\Exceptions\DbalException::wrap()
#1 /app/www/public/lib/private/Files/Cache/Propagator.php(137): OC\DB\QueryBuilder\QueryBuilder->executeStatement()
#2 /app/www/public/lib/private/Files/Cache/Wrapper/JailPropagator.php(42): OC\Files\Cache\Propagator->propagateChange()
#3 /app/www/public/lib/private/Files/Utils/Scanner.php(295): OC\Files\Cache\Wrapper\JailPropagator->propagateChange()
#4 /app/www/public/lib/private/Files/Utils/Scanner.php(299): OC\Files\Utils\Scanner->triggerPropagator()
#5 /app/www/public/lib/private/Files/Utils/Scanner.php(259): OC\Files\Utils\Scanner->postProcessEntry()
#6 [internal function]: OC\Files\Utils\Scanner->OC\Files\Utils\{closure}()
#7 /app/www/public/lib/private/Hooks/EmitterTrait.php(105): call_user_func_array()
#8 /app/www/public/lib/private/Files/Cache/Scanner.php(301): OC\Hooks\BasicEmitter->emit()
#9 /app/www/public/lib/private/Files/Cache/Scanner.php(240): OC\Files\Cache\Scanner->addToCache()
#10 /app/www/public/lib/private/Files/Cache/Scanner.php(480): OC\Files\Cache\Scanner->scanFile()
#11 /app/www/public/lib/private/Files/Cache/Scanner.php(404): OC\Files\Cache\Scanner->handleChildren()
#12 /app/www/public/lib/private/Files/Cache/Scanner.php(409): OC\Files\Cache\Scanner->scanChildren()
#13 /app/www/public/lib/private/Files/Cache/Scanner.php(409): OC\Files\Cache\Scanner->scanChildren()
#14 /app/www/public/lib/private/Files/Cache/Scanner.php(354): OC\Files\Cache\Scanner->scanChildren()
#15 /app/www/public/lib/private/Files/Utils/Scanner.php(277): OC\Files\Cache\Scanner->scan()
#16 /config/www/nextcloud/apps/files/lib/Command/Scan.php(180): OC\Files\Utils\Scanner->scan()
#17 /config/www/nextcloud/apps/files/lib/Command/Scan.php(241): OCA\Files\Command\Scan->scanFiles()
#18 /app/www/public/3rdparty/symfony/console/Command/Command.php(298): OCA\Files\Command\Scan->execute()
#19 /app/www/public/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#20 /app/www/public/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#21 /app/www/public/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#22 /app/www/public/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#23 /app/www/public/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#24 /app/www/public/console.php(100): OC\Console\Application->run()
#25 /app/www/public/occ(11): require_once('...')
#26 {main}
+---------+-------+-----+---------+---------+--------+--------------+
| Folders | Files | New | Updated | Removed | Errors | Elapsed time |
+---------+-------+-----+---------+---------+--------+--------------+
| 142     | 727   | 0   | 824     | 0       | 1      | 00:00:03     |
+---------+-------+-----+---------+---------+--------+--------------+

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

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

a) The javascript console log
b) The network log
c) ...
@github-cli github-cli added 0. Needs triage Issues that need to be triaged bug labels Mar 4, 2024
@Jerome-Herbinet Jerome-Herbinet added feature: acl Items related to the groupfolders ACL or "Advanced Permissions" feature: occ Items related to the OCC CLI interface labels Aug 21, 2024
@beckenc
Copy link

beckenc commented Oct 1, 2024

Hi all, have the same problem here and wonder if there is a workaround available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Issues that need to be triaged bug feature: acl Items related to the groupfolders ACL or "Advanced Permissions" feature: occ Items related to the OCC CLI interface
Projects
None yet
Development

No branches or pull requests

3 participants