<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ubuntu]]></title><description><![CDATA[General Ubuntu stuff - frankly speaking it's really notes to self]]></description><link>https://ubuntu.co.in</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Nov 2026 03:44:41 GMT</lastBuildDate><atom:link href="https://ubuntu.co.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Upgrading from Ubuntu 22.04 to Ubuntu 24.04 before August 2024]]></title><description><![CDATA[If you want to upgrade from Ubuntu 22.04 to Ubuntu 24.04 now, then, sudo apt-get upgrade or sudo apt-get dist-upgrade won't work since upgrading is…]]></description><link>https://ubuntu.co.in/upgrading-from-ubuntu-2204-to-ubuntu-2404-before-august-2024</link><guid isPermaLink="true">https://ubuntu.co.in/upgrading-from-ubuntu-2204-to-ubuntu-2404-before-august-2024</guid><category><![CDATA[upgrade]]></category><category><![CDATA[Ubuntu 24.04]]></category><dc:creator><![CDATA[Anjanesh Lekshminarayanan]]></dc:creator><pubDate>Thu, 13 Jun 2024 03:18:32 GMT</pubDate><content:encoded><![CDATA[<p>If you want to upgrade from Ubuntu 22.04 to Ubuntu 24.04 now, then,</p>
<p><code>sudo apt-get upgrade</code> or <code>sudo apt-get dist-upgrade</code></p>
<p>won't work since upgrading is possible only after Ubuntu 24.04_01 is released in August 2024.</p>
<p>To force upgrade to 24.04 execute</p>
<p><code>sudo do-release-upgrade -d</code></p>
<p>Since I'm performing this on my WSL on Windows, I don't mind if anything breaks here.</p>
]]></content:encoded></item><item><title><![CDATA[Using htpasswd to allow directory listing of files for a particular folder in Apache]]></title><description><![CDATA[Assuming you are using Apache2 and the regular good old LAMP stack. Use Case Scenario : You have the website located at /var/www/html and have a folder in…]]></description><link>https://ubuntu.co.in/using-htpasswd-to-allow-directory-listing-of-files-for-a-particular-folder-in-apache</link><guid isPermaLink="true">https://ubuntu.co.in/using-htpasswd-to-allow-directory-listing-of-files-for-a-particular-folder-in-apache</guid><category><![CDATA[htpasswd]]></category><category><![CDATA[directory-listing]]></category><category><![CDATA[htaccess]]></category><category><![CDATA[apache]]></category><dc:creator><![CDATA[Anjanesh Lekshminarayanan]]></dc:creator><pubDate>Tue, 11 Jun 2024 02:16:15 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1718072122685/229821f7-b53b-4e45-9073-cd7c1dd3f95a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Assuming you are using Apache2 and the regular good old LAMP stack.</p>
<p><strong>Use Case Scenario :</strong> You have the website located at <code>/var/www/html</code> and have a folder in it called PDFs where there are generated PDFs stored in there. And you want to periodically see which PDFs are located in that folder by going to https://my-domain.test/PDFs and have all the PDFs listed on which you can click on a PDF and the browser will either download it or have it viewable in the browser itself.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> /var/www/html/PDFs
htpasswd -c .htpasswd sammy
New password: 
Re-type new password: 
Adding password <span class="hljs-keyword">for</span> user sammy
</code></pre>
<p>Now create the .htacess file in PDFs to let it know that it is password protected for directory listing.</p>
<pre><code class="lang-bash">touch .htaccess
vi .htaccess
</code></pre>
<pre><code class="lang-bash">Options +Indexes

&lt;Files *&gt;
AuthType Basic
AuthName <span class="hljs-string">"Authentication Required"</span>
AuthUserFile /var/www/html/PDFs/.htpasswd
Require valid-user
</code></pre>
<p>Now, when you goto https://my-domain.test/PDFs in the browser, you'll be prompted for a username and password - enter sammy as the username and enter the password that you set before.</p>
]]></content:encoded></item><item><title><![CDATA[Converting a file from Windows format (utf-16) to Ubuntu format (utf-8)]]></title><description><![CDATA[ASCII '\0' appeared in the statement Error]]></description><link>https://ubuntu.co.in/converting-a-file-from-windows-format-utf-16-to-ubuntu-format-utf-8</link><guid isPermaLink="true">https://ubuntu.co.in/converting-a-file-from-windows-format-utf-16-to-ubuntu-format-utf-8</guid><category><![CDATA[ascii]]></category><category><![CDATA[MySQL]]></category><category><![CDATA[utf8]]></category><category><![CDATA[Ubuntu]]></category><category><![CDATA[utf-16]]></category><dc:creator><![CDATA[Anjanesh Lekshminarayanan]]></dc:creator><pubDate>Thu, 26 Oct 2023 01:58:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1698285492527/f5b4faf3-e3c1-470f-9e13-0850fb8a8796.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You've exported a MySQL dump (say the file is <code>my-db.sql</code>) from Windows in Powershell or via phpMyAdmin. Now you want to import the MySQL file, <code>my-db.sql</code>, on a Ubuntu machine. You get the error :</p>
<pre><code class="lang-bash">ERROR: ASCII <span class="hljs-string">'\0'</span> appeared <span class="hljs-keyword">in</span> the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run <span class="hljs-keyword">in</span> non-interactive mode.
</code></pre>
<p>Run this command on your Ubuntu machine :</p>
<pre><code class="lang-bash">iconv -f utf-16 -t utf-8 my-db.sql &gt; my-db_utf8.sql
</code></pre>
<p>Now import <code>my-db.sql</code> via <code>mysql --user=username --database=my-db_utf8 -p &lt; my-db.sql</code>. It should work.</p>
<p>PS: Incase you're not sure what kind of file <code>my-db.sql</code> is, try running <code>file my-sb.sql</code> in the Ubuntu terminal. For example :</p>
<pre><code class="lang-bash">file my-db.sql
my-db.sql: Little-endian UTF-16 Unicode text, with very long lines, with CRLF line terminators
</code></pre>
]]></content:encoded></item></channel></rss>