anand
anand

Reputation: 21

How to give bitnami user edit permission on .htaccess for bitnami multisite ec2?

I have installed a Bitnami Multisite Wordpress AMI on my Amazon EC2 instance. to setup the Multiite Network I need to make changes in the .htaccess file.

I checked the permission on the file : -rw-r--r-- 1 daemon daemon 235 Nov 29 12:15 .htaccess

I need the bitnami user to be able to edit the file. So first I did

getfacl .htaccess

# file: .htaccess
# owner: daemon
# group: daemon
user::rw-
group::r--
other::r--

I am logged in as bitnami user. So i used the command as below to give bitnami edit permissions.

sudo setfacl –m u:bitnami:rwx .htaccess

But I get the error as

Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
Try `setfacl --help' for more information.

Need help to resolve the same.

Thanks

Upvotes: 1

Views: 2394

Answers (1)

Jota Martos
Jota Martos

Reputation: 4714

Bitnami Engineer here.

You can change the permissions of the .htaccess file by running this command

sudo chown bitnami:daemon .htaccess
sudo chmod g+w .htaccess

After running those commands, you can start to edit the file.

For security and performance reasons, we do not allow Apache to read the .htaccess files. For this reason, we moved the configuration in the .htaccess files to the main application configuration files and set the AllowOverride option to None by default.

You have two different options to start using .htaccess files: - Edit the /opt/bitnami/apps/mediawiki/conf/htaccess.conf file and include the information of the .htaccess file inside a Directory block. You will find more information about this in this guide

https://docs.bitnami.com/aws/apps/wordpress-multisite/administration/use-htaccess/

  • Edit the /opt/bitnami/apps/wordpress/conf/httpd-app.conf file and change the AllowOverride option to All. After that, you will need to restart Apache

In both options, you will need to restart Apache after that:

sudo /opt/bitnami/ctlscript.sh restart apache

Upvotes: 0

Related Questions