Support

Akeeba Backup for Joomla!

#41125 An error occurred: Could not open ..LICENSE.txt for writing.

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.1.4
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Friday, 20 September 2024 09:52 CDT

HDcms

Hi

I was finally able to install lamp + mysql + phpmyadmin on ubuntu 24.04 :-)
I can download and display html files.

Now I want to do my 1st joomla installation by “import from url” or by file transfer

The folder is /var/www/html/j5-test/ only accessible as admin.
How can I quickly install joomla sites with Akeeba Kickstart Professional 8.0.4 without posing too many security problems?

regards

nicholas
Akeeba Staff
Manager

Please read https://www.akeeba.com/documentation/akeeba-kickstart-documentation/kscantextract.html.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

HDcms

Hi

If you are on a Linux machine, change the permissions of the root of your to-be-restored website to 0777. For example, if you're trying to restore to /var/www/mysite you have to issue a command like chmod -Rf 0777 /var/www/mysite after you have put Kickstart and the archive in there, but before launching Kickstart

I applied ‘chmod -Rf 0777 /var/www/mysite’ without sudo
I don't have the impression that it worked, but above all I didn't understand ‘but before launching Kickstart’ because I actually renamed it to start.php and launched it once before.
Should I transfer the file again?

 

 

 

 

HDcms

HI

ok I forgot sudo !

regards

nicholas
Akeeba Staff
Manager

Most likely your Apache is running under the default www-data:www-data while the /var/www folder is owned either by root or your own user. Most likely you are using PHP as an Apache module, which means that it runs under the same user and group as Apache itself. Therefore, Apache (and as a result PHP which is running in the same process, therefore under the same user and group) cannot write into the folder.

If this is a single site setup, do yourself a favour and make things easy. Assuming you have gone with the default “put everything under /var/www” approach.

Change the ownership of /var/www to your user:

sudo chown $USER:users /var/www -R

Change the permissions of /var/www and all its contents recursively:

sudo find /var/www -type f -exec chmod 0644 \{} \;
sudo find /var/www -type d -exec chmod 0744 \{} \;

Edit /etc/apache2/envvars and change the following lines:

export APACHE_RUN_USER=youruser
export APACHE_RUN_GROUP=youruser

Where youruser is your username.

Restart Apache for the changes to take effect:

systemctl restart apache2

Now Apache runs under your user, and so does PHP. You are logged in as your user, therefore all files you create over SSH and SFTP are owned by your user. The directory you are hosting your site in is also owned by your user. No more mixed permissions.

If you are not using PHP as an Apache module, or if you are using multiple sites, I recommend using a commercial host for now. It makes me sound like a jerk, but it's the reality of the situation.

Let me give you some word of advice.

You are probably trying to self-host because you were told it's easy and cheap. That wasn't a lie, but it came with undisclosed qualifiers. People giving that advice have a ton of experience in Linux administration. If you are an expert at something, it looks easy. The problem is, everyone I see self-hosting is not an expert.

To make matters worse, computers make things look deceptively easy. Setting up a server is dead easy, as you've found out. Setting up a server correctly, though, is anything but! You need a good grasp of the fundamentals. Without that, you hit problems you don't know how to solve, or even where to begin trying to solve. You start doing random things which either don't work or make things worse. Sounds familiar?

Here is my practical advice if you want to seriously go into self-hosting. Keep your sites on a commercial host for now. Production is not the place to learn (especially unsupervised). Set up a Linux VM on Virtualbox or similar, start setting up a server, and try solving the problems you run into. Embrace your failures, because they will be plenty. But that's how you learn.

And now, the tidbit of wisdom nobody tells you about. It only makes sense to self-host if you are doing it at scale, or if you have an IT team which costs a fraction of the revenue brought in by the self-hosted application. Anything else is a waste of time and money – if you are doing it right. Sure you can self-host without doing any maintenance on the server, but don't cry when you get hacked. Sure you can spend hundreds of hours every year to self-host a site which brings in a few hundred Euro per year, but don't cry when you're bankrupt and overworked.

I don't self-host anything but my dev servers and a single server which runs software I cannot run on a commercial host (or at least not without paying so much for a dedicated server that it makes little sense not going directly to an IaaS to buy compute resources directly). You know why? Because what the host charges me to do proper maintenance on the server is a fraction of how much my own time would cost to do the same. They have economies of scale. I have a dozen sites on two servers; I can't beat them on the economies of scale.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

HDcms

Hi
thanks for all these details. indeed I am not going to start self-hosting with the risks of hacking.
I will just keep this for my local test sites

Have a nice day

 

nicholas
Akeeba Staff
Manager

You're welcome!

Just don't give up. Learning at your own time is always a good idea even if you decide to never self-host. Understanding how hosting works makes it easier to troubleshoot minor and even some of the more major issues on a commercial host. Been there, done that :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!