Uploading theme and file

Keywords: Magento - Amazon Web Services - How to - Permissions
I have a lightsail Magento instance. I would like to upload my theme and a custom html file. However when I try to upload my custom html file I get:
Error: /opt/bitnami/apps/magento/htdocs/huzan.html: open for write: permission denied
Error: File transfer failed

Can you please help.

Hi @huzanforbes,

Thank you for using Bitnami. The Magento’s files are configured to be owned by daemon, this way the application can be updated or you can install any extension using the app’s dashboard. In case you want to modify any file inside the installation, you will need to use sudo.

In this case, you can copy the new .html file to the home folder of the user, and then move it to the proper folder

sudo mv ~/huzan.html /opt/bitnami/apps/magento/htdocs/huzan.html

Finally, please run these commands to set the proper permissions

sudo chown daemon:daemon -R /opt/bitnami/apps/magento/htdocs/

Happy to help!

Was my answer helpful? Click on :heart:

Hi @jota,

Thank you for your response. I understand this for one file, however, please let me know how can I copy full theme via sftp?

I’ll be looking forward for your support.

Kind Regards,

Hi @huzanforbes,

The process to copy a folder to the current installation is similar to the one I described above.

  • Copy the folder to the home folder of the bitnami user


  • Move the folder to the right place using sudo
sudo mv ~/newFolder /opt/bitnami/apps/magento/htdocs/folder/folder/newFolder
  • Change the permissions
sudo chown daemon:daemon -R /opt/bitnami/apps/magento/htdocs/

Let us know if you have any questions

Hi @jota,
Thank you for your response. Pardon my ignorance, but this code to change permission:

chown daemon:daemon -R /opt/bitnami/apps/magento/htdocs/

will come to the SSH. What would be the login username on FTP?

Yes, you will need to access the instance through a SSH connection and run the command. The mv command needs to be run using a SSH connection too.


We do not configure the SFTP settings to use the daemon user.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.