PHPMailer plugin in Organizr is not working

Even if you disabled TLS in the Organizr configuration page, if your mail server advertises that it supports TLS PHPMailer will try to use it, which will fail.

In order to resolve this edit file api/plugins/php-mailer.php and add after line 127 following:

$mail->SMTPAutoTLS = false;

Now sending emails should work without TLS usage.

Manually add files and folders to ownCloud

There are many ways to add files to your ownCloud:

  • FTP Upload
  • SCP Upload
  • Local disk to ownCloud disk transfer
  • USB disk to ownCloud disk transfer.

But it can be pretty slow and painful process if you are adding large number of files.

Easier way is to copy the files directly to your ownCloud data directory and scan them in order to be properly added and indexed by ownCloud.

First in order to do that you need to find the “occ” command which is usually found in the root of your owncloud web directory for example /www/owncloud/occ.

Then you copy your files and folders to the data directory where your personal files are located, it could be something like /owncloud/[USERNAME]/files/.

When your files are in the new location then you need to start the scan:

sudo -u www-data php /var/www/owncloud/occ files:scan --all

Depending on the amount of files you are adding this can take some time, and will print out the results when finished.

That’s it your files and folders are now manually added to your ownCloud.

Use wget to download entire web site for local browsing

wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains \
     --no-parent \

This command downloads the web site

The options are:

  • –recursive: download the entire Web site.
  • –domains don’t follow links outside
  • –no-parent: don’t follow links outside the directory fridge/chacking/.
  • –page-requisites: get all the elements that compose the page (images, CSS and so on).
  • –html-extension: save files with the .html extension.
  • –convert-links: convert links so that they work locally, off-line.
  • –restrict-file-names=windows: modify filenames so that they will work in Windows as well.
  • –no-clobber: don’t overwrite any existing files (used in case the download is interrupted and resumed).

Make Yum use specific package version from CentOS vault

Sometimes for a specific reason you want to use certain CentOS version which is removed from the main tree. Trying to update packages will report that packages for your version do not exist, but there is a way to fix this.

If you tweak the Yum repository files and remove mirrorlist directives and enable baseurl directives instead you will be able to download packages just for that specific release.

For example replace:




Where 7.3.1611 is the specific version.

If you installed some older version of CentOS which is now moved from the main tree to the vault, you could use following script to automatically tweak all Yum repository files.

RELEASE='grep -oE '[0-9]+\.[0-9]+\.[0-9]+' /etc/centos-release'
mkdir -p /etc/yum.repos.original.d
cp -r /etc/yum.repos.d /etc/yum.repos.original.d
cd /etc/yum.repos.d
sed -i 's/^mirrorlist=/###mirrorlist=/' *
sed -i 's/^#baseurl=/baseurl=/' *
sed -i '/^baseurl/$$RELEASE%' *

Consistent network device naming with systemd

Traditionally network device names in linux started with eth0/wlan0 where number 0 was incremented for each additional device. Problem with this naming was that device numbers did not match actual locations in computer.

Starting with v197 systemd/udev assigns predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces. Naming is based on firmware, topology and location information.

Advantage of this approach is that the names are fully automatic, predictable and they stay fixed even if the hardware is removed or added. This allows hardware to be replaced without network cards being renamed.

Device naming is following the schemes:

  • o = onboard device
  • s = PCI hotplug
  • x = MAC address
  • P = PCI domain
  • p = PCI bus number
  • s = slot number

For example device enp0s3 would be Ethernet device in PCI bus 0 slot 3.

Ethernet device named by MAC address would start with en followed by x and MAC address (f.e. enx00112233445566).

PCI hotplug Ethernet device would start with en followed by s and the slot number, followed by f and the function number for cards that have more than one function (f.e. ens1f4).