WordPress – Error: Could not connect to the server. Please verify the settings are correct.

When you attempt to run the WordPress core updates you receive the following error: “Error: Could not connect to the server. Please verify the settings are correct.”

Check and see if only two settings are available, “FTP” and “FTPS”. A more secure option is SSH2 which is supported by most Apache systems but this option is not visible in WordPress.

In order to add the SSH2 option, you will need to access the server shell and install “php-ssh2“. The command is “sudo apt install php-ssh2“.

Once php-ssh2 is installed, restart the Apache service using: “sudo systemctl restart apache2“.

Go back to WordPress and refresh the page, you should now see the below:

Enter your normal user credentials and select “SSH2” and click proceed. The update should now work as expected. You do not need to enter the authentication keys unless you set these up previously.

If it doesn’t and you receive “Could not create directory. Installation failed.” this means that your folder permissions are not set correctly for WordPress.

In order to fix the file and folder permissions use the following commands:

sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +
sudo chmod 660 wp-config.php

Some server configurations do not permit the wp-config.php file to be set to 660, it will result in the site becoming in accessible. If this is the case in your situation, change the permissions to 664 and this should resolve the issue (It adds the “read” permission back for guests).

Do not have permission to delete file or folder – Windows 10

You do not have permission to delete a file or folder in Windows 10

Symptom(s): 

You attempt to delete a file or folder on a Windows 10 drive and receive a permission denied error or that you must get permission from another user in order to delete that file.  Changing the permissions through the Advanced tab on security has no effect.

permission

Solution(s):

  1. Right Click on the folder and Select Properties, then click the “Security Tab” followed by “Advanced
  2. Change the Owner at the top of the Advanced Window to your Windows User Account located at C:\Users
  3. Check “Replace Owner on Subcontainers and objects”
  4. Click Apply, and then click OK two more times and exit the properties window.
  5. Once its applied, go back into properties again, “Security Tab” followed by “Advanced”
  6. Check the box at the bottom of the Window that says, “Replace all child object permission entries with inheritable permission entries from this object”.
  7. Click Apply again.
  8. Click OK two more times and exit the properties window.

You should now have access, this problem can occur from a variety of sources.  One example is when another user on the system creates a directory or file and places restrictions on that file or directory.  Only the security ID that it was created with can access that information unless a user with Administrative authority takes over that file or directory.  Another example is when a user re-installs the Windows operating system or attempts to copy old data from a former Windows install to a new hard drive.  Again, since windows is now a new installation, the security ID information will no longer match and the error will occur.

This error seems to be specific to Windows 7, Windows 8, and Windows 10.  It may occur in Windows Vista as well since that was the first version of Windows to have User Account Control (UAC) enabled in the file system.

 

Joomla: Proper permissions for configuration.php

Symptom: What is the proper permissions for Joomla’s configuration.php?

Solution: The proper setting is 0644

owner: read and write permissions,
group: only read permissions,
others: only read permissions.

To change from SSH/Telnet
: chmod 644 configuration.php

Always check the configuration.php permissions after a fresh install as some servers require it to be set to 777 prior to completing the configuration.