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

Error after nextcloud update : error stack in a sourced file #1820

Open
Ghriann opened this issue Aug 25, 2023 · 0 comments
Open

Error after nextcloud update : error stack in a sourced file #1820

Ghriann opened this issue Aug 25, 2023 · 0 comments

Comments

@Ghriann
Copy link

Ghriann commented Aug 25, 2023

Hello folks,

After upgrading NCP to the lasest version (1.52.4), we've got a funny error at every bash startup :

bash: Your: command not found
bash: Permissions: command not found
bash: An: command not found
bash: Exception:: command not found
bash: Stack: command not found

Actually it was because the file /usr/share/bash-completion/completions/ncp had been replaced with an error stack :

$ cat /usr/share/bash-completion/completions/ncp
Your data directory is not writable.
Permissions can usually be fixed by giving the web server write access to the root directory. See https://docs.nextcloud.com/server/26/go.php?to=admin-dir_permissions.

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:167
Stack trace:
#0 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands()
#1 ncc(11): require_once('...')
#2 {main}

The update was run without the data HD connected (my bad), but still, quite weird to find an error stack in my nextcloud server files, and the resulting bash error might bewild most beginner users.

P.S. : where can I find the proper content of this file to restore it ?
P.S.2 : I find this bug actually quite dangerous for the system, since a line of the stack error could be an actually valid command, which would have been sourced with root permissions ...

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

No branches or pull requests

1 participant