-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
unreadable folder in external smb share raises unhandled ForbiddenException during occ files:scan #22295
Comments
Hm. I'm still getting ForbiddenException even with check_acl turned on. |
We had the same issue here which rendered our NC instance kind of unusable, because as a consequence, a lot of files were not synced by the desktop clients. Enabling ACLs improved the situation (it does not crash on every unreadable directory), but it still crashed on directories where the user only has traverse permissions (i.e. Linux permissions: "--x"). After adding the try/catch-block, everying worked again. Thanks a lot! Hopefully, it will be fixed in the next release. BTW: I'm on 19.0.2 right now. I haven't tried 19.0.3, yet, but the SMB.php still looks the same: |
This issue still exists in 20.0.8:
Since commit e9ae943 changed the SMB.php, I moved the try catch block to Scanner.php:
|
Is this Issue still valid in NC21.0.2? If not, please close this issue. Thanks! :) |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi!
Summary
occ files:scan
raises ForbiddenException when I scan an external smb share that includes a folder to which the user has no access to. The same seems to happen when the cron job runs.Stack trace
Possible solution
I found a solution, simply by enclosing the relevant function call in a try catch block:
Steps to reproduce
occ files:scan --all
.Expected behaviour
The scan should complete, ignoring the folders that cannot be read.
Actual behaviour
The scan crashes at the unreadable folder.
Server configuration
Operating system: CentOS Linux release 8.2.2004 (Core)
Web server: Apache/2.4.37 (centos)
Database: mysql Ver 15.1 Distrib 10.3.17-MariaDB, for Linux (x86_64) using readline 5.1
PHP version: PHP 7.4.9
Nextcloud version: 19.0.1
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: https://download.nextcloud.com/server/releases/latest.tar.bz2
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: smb
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP
LDAP configuration (delete this part if not used)
LDAP config
Client configuration
Browser: Chrome 84.0.4147.89
Operating system: Fedora release 32 (Thirty Two)
Logs
Web server error log
Web server error log
The text was updated successfully, but these errors were encountered: