title: Linux Server/Python: OSError: [Errno 13] Permission denied
body: <p>I've tried writing a program in Python which takes some values, makes a directory and adds it to a text file for later use. I've uploaded it to an ubuntu VPS server as I intend to use it at a later date with my website. However, whenever I run the code (below) I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "fileCreator.py", line 13, in &lt;module&gt;
      os.mkdir(dirName)
  OSError: [Errno 13] Permission denied: 'just-a-test'
  </code></pre>
  
  <p>Python Code:</p>
  
  <pre><code>#!/usr/src
  import os
  from distutils.dir_util import copy_tree
  import sys
  
  title = raw_input("Blog Title: ")
  dirName = title.replace(" ", "-").lower()
  
  if os.path.isdir(dirName):
      print("Error: Directory Exists")
      sys.exit()
  else:
      os.mkdir(dirName)
  
  copy_tree("page", dirName)
  
  def assignment(title, dirName ):
      desc = raw_input("Article Description: ")
  
      fo = open(dirName + "/txt-files/title.txt", "w")
      fo.write(title)
      fo.close()
  
      fo = open(dirName + "/txt-files/desc.txt", "w")
      fo.write(desc)
      fo.close()
  
      return None
  
  assignment(title, dirName)
  print("Done")
  </code></pre>
  
  <p>It's some sort of permission error and I've seen a few other topics on it but none of them have resulted in a solution. I'm not overly proficient with Linux commands, so bare with! Would really appreciate the help!</p>