WordPress error Download failed.: Failed writing body

While upgrading wordpress, or installing/upgrading any theme or plugin, you may get following error in the admin panel.

Download failed. Failed writing body (66 != 1448)

Most probably, you are out of disk space so its good to check the disk usage in cpanel or on shell and delete unwanted files or upgrade the disk space.

Once the disk space is upgraded, try to upgrade again.

It should work. 🙂

Invalid username or password, please try again. An issue in a ubuntu VPS

After creation or migrating the VPS to a new node, you may face issues related to the Parallels Power Panel of the Container, root password not accepted for the Power Panel and the following error message is shown:

“Invalid username or password, please try again.”

SSH working though.

Reason : The default policy in Ubuntu 8.10 seems to be forced to use SHA512 hashing. For example, in Debian 5.0 (and previous versions of Debian, Ubuntu) it was set to MD5.

# grep '^[^#]' /etc/pam.d/common-password
password required pam_unix.so nullok obscure min=4 max=8 md5

Fix : It is sufficient to update the file /etc/pam.d/common-password and reset the ‘root’ password inside a Container.

# vzctl enter containerID
# sed '/^password.*pam_unix.so.*sha512/ s~sha512~md5~' -i etc/pam.d/common-password

After that this file /etc/pam.d/common-password will contain these lines,

# grep '^[^#]' /etc/pam.d/common-password
password [success=1 default=ignore] pam_unix.so obscure md5
password requisite pam_deny.so
password required pam_permit.so

and reset the root password by

# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Now, try to access the Power Panel by https://serverIP:4643.

Should be fine now.