<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Lancs on bramp.net</title>
    <link>https://blog.bramp.net/</link>
    <description>Recent content in Lancs on bramp.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-GB</language>
    <lastBuildDate>Wed, 04 Feb 2009 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.bramp.net/tags/lancs/" rel="self" type="application/rss+xml" />
    
    <item>
      <title>A Practical Introduction to Version Control Systems</title>
      <link>https://blog.bramp.net/post/2009/02/04/a-practical-introduction-to-version-control-systems/</link>
      <pubDate>Wed, 04 Feb 2009 00:00:00 +0000</pubDate>
      
      <guid>https://blog.bramp.net/post/2009/02/04/a-practical-introduction-to-version-control-systems/</guid>
      <description><p>Today I presented a CAKES talk in our department to help teach people about version control systems. I hope by sharing my knowledge on a subject, that others will share theirs. Below is the abstract and slides for my tak:</p>
<p>This talk aims to explain what version control systems (VCS) also known as source control management (SCM) are, how they work, and how to use them. This includes explaining why you should use VCS for your every day projects, even if they don’t include any source code. The differences between the main two classes of VCS; centralised and decentralised systems will be discussed, outlining both their benefits and disadvantages. This presentation will give you practical knowledge to start using systems such as subversion (SVN) or git, as well as many example use cases. Bottom line is that using a VCS can help you keep your work organised, backed up, revertible, whilst allowing contributions from multiple users. This talk is for anyone that has heard about CVS/SVN/git but was never quite sure what it was, or how to use it.</p>
<p><a href="version_control.pdf">Download Slides</a></p>
</description>
    </item>
    
    <item>
      <title>Read/Write permissions for PHP scripts at lancs.ac.uk</title>
      <link>https://blog.bramp.net/post/2009/01/21/read-write-permissions-for-php-scripts-at-lancs.ac.uk/</link>
      <pubDate>Wed, 21 Jan 2009 00:00:00 +0000</pubDate>
      
      <guid>https://blog.bramp.net/post/2009/01/21/read-write-permissions-for-php-scripts-at-lancs.ac.uk/</guid>
      <description><p>My girlfriend wanted to create a blog, and she attempted to use her <a href="http://www.lancs.ac.uk/ug/cranen">university provided web space</a>. However, the blog software seemed unable to write to her webspace. Typically you would fix this by changing the write permissions on the file/directory like so:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chmod g+w filename
</span></span></code></pre></div><p>or</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chmod o+w filename
</span></span></code></pre></div><p>However this did not seem to work. I noticed that the files which hosted the website were on a SunOS 5.8 machine, and this seemed to support access control lists (ACLs). So I looked at a few of the ACLs for the files and they looked like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ getfacl filename
</span></span><span class="line"><span class="cl">user::rwx
</span></span><span class="line"><span class="cl">group::rwx              <span class="c1">#effective:rwx</span>
</span></span><span class="line"><span class="cl">group:httpadmin:rwx     <span class="c1">#effective:rwx</span>
</span></span><span class="line"><span class="cl">mask:rwx
</span></span><span class="line"><span class="cl">other:r--
</span></span></code></pre></div><p>Since there is the group:httpadmin line, ISS are clearly using these ACLs. So I figured I would add the user the webserver is running under to the ACL. A quick look at a phpinfo() page showed me that the web server is running under user www in group www. So I first tried the following:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">setfacl -m user:www:rw- filename
</span></span></code></pre></div><p>But that oddly didn’t work, but then I noted that the webserver was a linux machine, not SunOS, and that the UID of www was 48. A quick look at the UID of www on SunOS and it shows it is a completely different number. So for what ever reason ISS were unable to make the UIDs match between computers, so the correct command to type is:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">setfacl -m user:48:rw- filename
</span></span></code></pre></div><p>Bottom line, if you wish to make your files or directories writable by scripts running on the webserver you must log into cent1 (via ssh), change to your www directory “/home/cent1/NN/username/www/public_html” and then issue the above command to the appropriate files.</p>
</description>
    </item>
    
  </channel>
</rss>
