<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gj |</title>
	<atom:link href="https://blog.gaiterjones.com/category/ubuntu-lts/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.gaiterjones.com/category/ubuntu-lts/</link>
	<description>gaiterjones</description>
	<lastBuildDate>Tue, 02 Jul 2019 11:35:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.3</generator>
	<item>
		<title>OMG Ubuntu 18.04 LTS wraps all my files up in single quotes!</title>
		<link>https://blog.gaiterjones.com/omg-ubuntu-18-04-lts-wraps-all-my-files-up-in-single-quotes/</link>
					<comments>https://blog.gaiterjones.com/omg-ubuntu-18-04-lts-wraps-all-my-files-up-in-single-quotes/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Mon, 14 May 2018 11:45:53 +0000</pubDate>
				<category><![CDATA[Ubuntu LTS]]></category>
		<category><![CDATA[WTF]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1896</guid>

					<description><![CDATA[Don&#8217;t panic. Coretutils 8.25+ adds single quotes to filenames containing spaces&#160; when listed with ls ls -al-rw-r&#8211;r&#8211; 1 root root 0 May 14 11:41 &#8216;file with spaces&#8217; When you first...<a class="more-link" href="https://blog.gaiterjones.com/omg-ubuntu-18-04-lts-wraps-all-my-files-up-in-single-quotes/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[
<p>Don&#8217;t panic.</p>



<p>Coretutils 8.25+ adds single quotes to filenames containing spaces&nbsp; when listed with ls</p>



<p>ls -al<br>-rw-r&#8211;r&#8211; 1 root root 0 May 14 11:41 &#8216;file with spaces&#8217;</p>



<p>When you first see this you may think &#8220;WTF has happened to my files&#8221; &#8211; stay frosty :</p>



<ul><li>It was introduced in coreutils v8.25, and alignment improved in v8.26</li><li>It <strong>only happens when outputting to terminals</strong> so doesn&#8217;t break scripts</li><li>It disambiguates the output for users for files containing whitespace</li><li>It sanitizes output so it is<span>&nbsp;</span><strong>safe</strong><span>&nbsp;</span>to copy and paste</li><li>Output is now always<span>&nbsp;</span><strong>valid</strong><span>&nbsp;</span>to copy and paste back to shell</li><li>you can get back to the old format by adding -N to the ls alias or&nbsp;set export QUOTING_STYLE=literal in your .bashrc</li></ul>



<p>And relax &#8211; all is well&#8230;</p>



<p>Taken from <a href="https://unix.stackexchange.com/questions/258679/why-is-ls-suddenly-wrapping-items-with-spaces-in-single-quotes">https://unix.stackexchange.com/questions/258679/why-is-ls-suddenly-wrapping-items-with-spaces-in-single-quotes</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/omg-ubuntu-18-04-lts-wraps-all-my-files-up-in-single-quotes/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Cannot Send PHP Mail after Ubuntu Upgrade</title>
		<link>https://blog.gaiterjones.com/send-php-mail-ubuntu-upgrade/</link>
					<comments>https://blog.gaiterjones.com/send-php-mail-ubuntu-upgrade/#comments</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Wed, 29 Oct 2014 09:14:47 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu LTS]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1247</guid>

					<description><![CDATA[I recently made a list of problems experienced after upgrading from Ubuntu 12.04 LTS to Ubuntu 14.04.1 LTS, an additional problem that finally came to light about a week later was...<a class="more-link" href="https://blog.gaiterjones.com/send-php-mail-ubuntu-upgrade/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>I recently made a list of <a title="Upgrading Ubuntu Server 12.04 LTS to 14.04.01 LTS" href="https://blog.gaiterjones.com/upgrading-ubuntu-server-12-04-lts-14-04-01-lts/">problems experienced</a> after upgrading from Ubuntu 12.04 LTS to Ubuntu 14.04.1 LTS, an additional problem that finally came to light about a week later was that mail sent from php scripts using the php mail() function stopped working.</p>
<h1>php mail() returns FALSE</h1>
<p>My Ubuntu mail setup uses sendmail with exim4. After the upgrade I was occasionally seeing the following exim4 error</p>
<p>2014-10-29 08:00:50 unable to set gid=33 or uid=0 (euid=0): forcing real = effective</p>
<p>Normal email was working fine and php mail from the command line, or cron jobs was also working fine. It was only email sent via web sites i.e. with online forms using the php mail command i.e.</p>
<p>$mail=\mail($email, $subject, $message);</p>
<p>$mail would always return FALSE, and an exim4 error would be logged.</p>
<p>The exim error points to a permissions problem with the Apache user group &#8211; www-data in Ubuntu. Group ID 33 is www-data.</p>
<p>After googling around for a while and looking at various configuration options in php.ini the resolution lay with the Apache <a href="http://mpm-itk.sesse.net/" target="_blank">ITK MPM</a> module.</p>
<p>It seems that a default configuration in this module with Apache 2.7 has some kind of influence on the permissions associated with the www-data user/group when communicating with exim4.</p>
<p>The fix is to explicitly define the ITK MPM module <strong>LimitUIDRange</strong> parameter in the /etc/apache2/mods-available/mpm_prefork.conf module configuration to something like</p>
<p>LimitUIDRange 0 2000</p>
<p>Restart Apache and Exim 4 and PHP mail via Apache works again.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/send-php-mail-ubuntu-upgrade/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>Upgrading Ubuntu Server 12.04 LTS to 14.04.01 LTS</title>
		<link>https://blog.gaiterjones.com/upgrading-ubuntu-server-12-04-lts-14-04-01-lts/</link>
					<comments>https://blog.gaiterjones.com/upgrading-ubuntu-server-12-04-lts-14-04-01-lts/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Thu, 23 Oct 2014 10:17:25 +0000</pubDate>
				<category><![CDATA[Ubuntu LTS]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=1245</guid>

					<description><![CDATA[Back in July I was ranting about the new Facebook API that requires PHP 5.4 or later. My main production server was running Ubuntu 12.04 LTS with PHP 5.3, and although the...<a class="more-link" href="https://blog.gaiterjones.com/upgrading-ubuntu-server-12-04-lts-14-04-01-lts/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>Back in July I was ranting about the new <a title="Facebook API v2.0 Ubuntu PHP 5.4 #fail" href="https://blog.gaiterjones.com/facebook-api-v2-0-ubuntu-php5-4-fail/">Facebook API</a> that requires PHP 5.4 or later.</p>
<p>My main production server was running Ubuntu 12.04 LTS with PHP 5.3, and although the 14.04 LTS had been released it wasn&#8217;t available as a release upgrade until the 14.04.01 release was out, so I was waiting for that before I would even think about upgrading.</p>
<p>So the release upgrade to Ubuntu 14.04.01 LTS has been available for a while and I was putting off the upgrade until I had some time to test it on a development server which I did and everything seemed to go ok. I did however make a major mistake in that I upgraded my dev vmware server and assumed that just because the upgrade worked, everything else worked and went ahead with my production server upgrade.</p>
<h1>do-release-upgrade</h1>
<p>I love Ubuntu and have been using it since Hardy Heron (8.04) so far my experiences with upgrading Ubuntu Server have been pretty good, as long as I stick with the LTS versions, minor and major upgrades haven&#8217;t caused me any major heartaches.</p>
<p>Simply run do-release-upgrade from the console, make a coffee and put your feet up.</p>
<h1>UBUNTU 14.04.01 LTS Trusty THAR</h1>
<p>As I mentioned my main goal of upgrading was to upgrade PHP, Ubuntu 14.04.01 upgrades my most crucial apps to:</p>
<div>PHP : 5.5.9<br />
MySQL : 5.5.40<br />
Apache : 2.4.7<br />
Memcache : 3.0.8</div>
<div></div>
<div>The main show stopping issues I faced were with the Apache upgrade to 2.4.7. So here are the issues that caused me the most downtime and how to resolve them.</div>
<h1>APACHE 2.4.7 Errors</h1>
<p><strong>NameVirtualHost</strong></p>
<p>As the upgrade finishes one of the last packages to install in Apache and you will quite possible see that apache fails to start after the upgrade.</p>
<p>This is quite likely to be due to older configurations lurking in your Apache config files, for me there was an error in ports.conf where I had an old virtual hosts statement : NameVirtualHost *:443 which is no longer supported.</p>
<p>I removed the NameVirtualHost statements (ports.conf just requires a Listen statement).</p>
<p>After editing ports.conf apache started ok.</p>
<p><strong>Forbidden You don&#8217;t have permission to access / on this server. Apache/2.4.7 (Ubuntu) Server at localhost Port 80</strong></p>
<p>I eagerly tried to load a website on the server and got the above error, in fact all my websites were down.</p>
<p>It took a while to track down the causes of this error but the main cause of the problem I think is that my apache2.conf file was overwritten by the upgrade even though I am sure I was asked to keep my original files by the installer.</p>
<p>My default WWW folder is not in the default /var/www and this was the cause of the first problem. Edit apache.conf and add the directory configuration for your default WWW parent folder. Reload apache and&#8230;</p>
<p>No websites work.</p>
<h1>APACHE 2.4.7 UPGRADE RENAME SITES-AVAILABLE CONFIG FILES to .CONF</h1>
<p>Apache 2.4.7 requires all apache site config files to have a .conf extension. As the release notes nicely point out all files without a .conf extension are silently ignored.</p>
<p>I am not sure why my site config files never had a .conf extension, I guess either I picked up a bad habit or thats just the way most people create them. Basically all my site config files were being ignored so I still had no websites.</p>
<p>To resolve this obviously rename the files so they have a .conf extension and then add the sites again with a2ensite config.conf and reload apache.</p>
<p>No websites work.</p>
<p>The final problem I had was that access control commands have changed in apache 2.4.7 instead of</p>
<p>Order allow,deny<br />
Allow from all</p>
<p>You should use</p>
<p>Require all granted</p>
<p>Another thing that might also catch you out is that the options statement cannot be mixed with + or &#8211; indicators</p>
<p>Options -Indexes Multiviews FollowSymLinks</p>
<p>&nbsp;</p>
<p>Will NOT work. Either all options must have a plus minus enabler or none should have one, so use Options -Indexes +Multiviews +FollowSymLinks  instead.</p>
<p>If you have a lot of sites enabled, be prepared for this to take a while as you rename and edit each site file, save it, re-add the site to apache and reload the apache config.</p>
<p>Eventually after going through all my site configs, my websites slowly came back online.</p>
<p>&nbsp;</p>
<h1>PHP 5.5 ERRORS</h1>
<p>Unfortunately that wasn&#8217;t the end of my troubles, two main issues came out of the PHP upgrade.</p>
<p><strong>PHP.INI overwritten</strong></p>
<p>Like the Apache conf my php.ini files were also (I think) overwritten and I am not entirely sure why. The main issue from this for me was that my error settings had changed so I was now seeing STRICT and DEPRECATED errors that I was safely ignoring before.</p>
<p>My PHP cron jobs were also failing due to a similar configuration error in the PHP-CLI ini file.</p>
<p><strong>MCRYPT DISABLED</strong></p>
<p>Another problem I noted was that php-mcrypt was not enabled and I was seeing fatal error Call to undefined function mcrypt_decrypt() &#8211; even though  php5-mcrypt was installed.</p>
<p>To resolve this problem (which is probably also associated with the config problems) re-enable the mcrypt module with <em>php5enmod mcrypt </em>and restart Apache.</p>
<p><strong>HTTP custom headers</strong></p>
<p>Finally another error related to Apache is that custom HTTP headers cannot contain the underscore character any more. Apache will silently ignore them and they will not appear in the PHP SERVER array.</p>
<p>This was affecting all my XHR javascript file uploads due to a filename being set with a custom header using underscores:</p>
<p>xhr.setRequestHeader(&#8220;X_FILENAME&#8221;, file.name);</p>
<p>Fortunately the work around is to simply replace the underscore with a minus</p>
<p>xhr.setRequestHeader(&#8220;X-FILENAME&#8221;, file.name);</p>
<p>Interestingly on the server side you still see the header as HTTP_X_FILENAME so your server side PHP code does not need to change, but any client side code creating custom headers cannot use underscores in the header name.</p>
<p><strong>LOG ROTATE ERRORS</strong></p>
<p>The next day, as system tasks started running I saw this error</p>
<p>error: skipping &#8220;/var/log/mysql.log&#8221; because parent directory has insecure permissions</p>
<p>This is resolved by editing /etc/logrotate.conf and adding the following to the configuration</p>
<p># use the syslog group by default, since this is the owning group<br />
# of /var/log/syslog.<br />
su root syslog</p>
<h1>Lessons Learned</h1>
<p>What can we learn from this, firstly always, always, always have backups. My whole system was backed up so simply restoring back to 12.04 LTS was a last result option.</p>
<p>Don&#8217;t try to fix it if it isn&#8217;t broken. Did my server really need to be upgraded? Yes I think so, although 12.04 is supported until 2017 I needed PHP 5.4+ and I Would have been faced with these upgrade issues at some point anyway.</p>
<p>Read the release notes. Yeah right. I guess I could have read the Apache release notes but no one really does that in the real world.</p>
<p>Better testing. I thought I had tested the upgrade but my dev server did not properly mirror my production server so I was unable to test everything.</p>
<p>Fresh install instead of upgrade. I would never consider doing this on an older LTS. Build a new server with a fresh install of LTS and migrate your production sites and software over to it.</p>
<p><strong>OTHER TESTS</strong></p>
<p>Magento 1.9.x is running without issues after the upgrade</p>
<p>WordPress is running without issues</p>
<p>SMF is running without issues</p>
<p>MYSQL (apart from the fact that it is deprecated) is running without issues</p>
<p>memcached is running without issues</p>
<p>dropbox is running without issues</p>
<p>exim4 and spam assasin (mail) is running without issues</p>
<p>shoutcast and darwin media server are running without issues</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/upgrading-ubuntu-server-12-04-lts-14-04-01-lts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
