0

I'm new to Bitnami and currently using a Google Cloud Platform for my VMs. I'm trying to password protect a wordpress installation for 1 of my VMs. It's a dev site so only going to be using the IP address to access the site.

However following the instructions I found here, I am unable to write in the opt/bitnami/apache2/ folder. Everytime I try to run the commands in the above linked instruction, I get the following error /opt/bitnami/apache2/bin/htpasswd.bin: cannot create file opt/bitnami/apache2/wordpress_users

I've tried to manually change the permissions on the folder and it doesn't work. I can't seem to run any commands with SU because there is no password provided for shell access (using only a ssh cert file)

Can anyone can offer help as to what I'm doing wrong or what I'm missing?

Thanks

Steph Moreau
  • 170
  • 2
  • 14

3 Answers3

0

Bitnami developer here,

It is not necessary to modify permission for the apache2 folder nor the htpasswd.bin file. The bitnami user does not have a password by default but is allowed to run commands with higher privileges using sudo. Could you please try to revert the permission changes and run the command with sudo?

cd /opt/bitnami
sudo apache2/bin/htpasswd -cb apache2/wordpress_users your_desired_username your_desired_password

Let me know if you have any other issue or if it worked for you.

Best regards,

Gonzalo

0

Thanks for the idea but it didn't work, I tried with sudo having my apache2/ folder set to 755 and ownership back to it's original setting.

On the other hand.... I manage to solve my problem. Seems that in the original on how to call your command there is a part missing! Well it's missing for me cause by adding the fullpath to the original file I was able to successfully get a password in place and things are now working perfectly

$ opt/bitnami/apache2/bin/htpasswd -cb apache2/wordpress_users username password

Took me too long to get that working... Thanks for the help, without you I wouldn't have made a typo that made me rethink the error! Thanks again

Steph Moreau
  • 170
  • 2
  • 14
0

Bitnami developer here,

Sorry I didn't mentioned that you need to change to the /opt/bitnami directory first as I thought you already did it. Also, you have to run command with sudo because root is the owner of the apache2 folder.

Apart from that, I'm glad you could fix your issue!

Best regards, Gonzalo

  • I was in the /opt/bitnami directory and still had to type in the full command "opt/bitnami/apache2/bin/htpasswd" in order to get it working... – Steph Moreau Sep 22 '15 at 15:55