Bitwarden update script longer have permssion

Not sure what happened here. But it seams i have lost permission to the bitwarden installer/updater script.

┌──(bitwarden😈bitwarden)-[~]
└─$ cd /opt/bitwarden
                                                                                                                                                             
┌──(bitwarden😈bitwarden)-[/opt/bitwarden]
└─$ ./bitwarden.sh updateself
zsh: permission denied: ./bitwarden.sh
                                                                                                                                                             
┌──(bitwarden😈bitwarden)-[/opt/bitwarden]
└─$ 

Has anyone had this happen? What can I do? If i try to run script as sudo it yells at me that i should not. I dont know when this started so i dont know when to do a restore.

Does the .sh file has execute permissions?

I am still a noob when it comes to linux. What command should i run to verify that question?

─(bitwarden😈bitwarden)-[/opt/bitwarden]
└─$ ./bitwarden.sh updateself
zsh: permission denied: ./bitwarden.sh
                                                                                                                                                             
┌──(bitwarden😈bitwarden)-[/opt/bitwarden]
└─$ sudo -i                   
[sudo] password for bitwarden: 
root@bitwarden:~# cd /opt/bitwarden
root@bitwarden:/opt/bitwarden# ls
bitwarden.sh  bwdata
root@bitwarden:/opt/bitwarden# ./bitwarden.sh updateself
 _     _ _                         _
| |__ (_) |___      ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2025, Bitwarden, Inc.
https://bitwarden.com, https://github.com/bitwarden

===================================================

WARNING: This script is running as the root user!
If you are running a standard deployment this script should be running as a dedicated Bitwarden User as per the documentation.
Do you still want to continue? (y/n): n

In the folder where the .sh file is located: ls -l
At the start of the line there should be something visible like : -rw-r–r– (In this case there are no execution rights)

This link provides some more information about this: https://www.baeldung.com/linux/bash-check-file-executable

I get the following. If i ran the correct commands it looks like just the script file is now owned by root and is not executable. The folder looks to be ok.

┌──(bitwarden😈bitwarden)-[/opt/bitwarden]
└─$ ls -all bitwarden.sh
-rwxr--r-- 1 root root 9238 Oct 27 20:57 bitwarden.sh

┌──(bitwarden😈bitwarden)-[/opt/bitwarden]
└─$ if [ -x bitwarden.sh ]; then echo "File is executable"; else echo "File is not executable"; fi
File is not executable


(bitwarden😈bitwarden)-[~]
└─$ ls -dall /opt/bitwarden
drwx------ 3 bitwarden bitwarden 4096 Oct 27 20:57 /opt/bitwarden
                                                                                                                                                             
┌──(bitwarden😈bitwarden)-[~]
└─$ if [ -f /opt/bitwarden ] && [ -x /opt/bitwarden ]; then echo "File is executable"; else echo "File is not executable"; fi
File is not executable

If you want to run bitwarden.sh as a user other than root, you can change the owner to your user with sudo chown $USER bitwarden.sh. The $USER variable should automatically get replaced with the user you run the command as.

Edit: alternately if you want the script to be run by any user, you can set the execute bit for everyone with sudo chmod +x bitwarden.sh.

That worked…

Is there any way to find out how or why that happen. I have had no issues with that until now.

  • edit - its possible that i may have run - Topgrade to update the server. Just not sure if I did and/or if that would break bitwarden.
┌──(bitwarden😈bitwarden)-[/opt/bitwarden]
└─$ ./bitwarden.sh updateself                                                                                      
 _     _ _                         _
| |__ (_) |___      ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2025, Bitwarden, Inc.
https://bitwarden.com, https://github.com/bitwarden

===================================================

bitwarden.sh version 2025.10.0
Docker version 28.1.1, build 4eba377
Docker Compose version v2.35.1

Updated self.
                                                                                                                                                             
┌──(bitwarden😈bitwarden)-[/opt/bitwarden]
└─$ ./bitwarden.sh update        
 _     _ _                         _
| |__ (_) |___      ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2025, Bitwarden, Inc.
https://bitwarden.com, https://github.com/bitwarden

===================================================

bitwarden.sh version 2025.10.0
Docker version 28.1.1, build 4eba377
Docker Compose version v2.35.1

Update not needed
                                                                                                                                                             
┌──(bitwarden😈bitwarden)-[/opt/bitwarden]

Without context it’s hard to tell. I don’t self host bitwarden, so I’m not familiar with their update scheme, but if it involves pulling changes from a git repo, a change in permissions on the remote end could lead to the change on your local system.

What exactly are you trying to install Bitwarden on? What sort of device? Your NAS, a VM, something else?

FWIW, I use Vaultwarden as my backend for the Bitwarden clients on my PCs and phones, and it is dead simple. Works great too. I could share my Vaultwarden docker compose if you are interested.