Results 1 to 4 of 4
  1. #1

    Member Since
    Dec 11, 2010
    is there anyway I can edit a file that I dont have permission for?
    Hi, ive been messing around with terminal and I saw this code that can set up a very simple server on your 8080 port

    python -m SimpleHTTPServer 8080

    And it works great and ive had fun messing around with it, but when i put an html file named index.htm or named anything else, the html code isn't translated into the page, it justs displays the code

    i've navigated to the file


    and found that when I edit it, i can edit the html file that is the root directory when you start that server, the only thing is that I can't save the file as i dont have permission. Anyone have any tips?

  2. #2

    Member Since
    Dec 04, 2010
    Edit the file however you need to. Save it to your desktop. Then copy the saved file to the originals location in Finder. In the dialogs that pop up click Replace, and put in your password.

  3. #3

    Member Since
    Apr 09, 2009
    Ithaca NY
    13 inch alMacBook 2GHz C2D 4G DDR3, 1.25GHz G4 eMac
    or sudo chmod 777 /file/path/here

  4. #4

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    2012 13" MBP (2.5 i5, 8GB)
    Just a tip - you shouldn't be using Python's SimpleHTTPServer for anything serious (I'm not saying you are though).

    A much easier solution would be to simply write a small server in Python using SimpleHTTPServer and run that from a directory that you have permissions to. Using Python's docs to help me here (I'm largely unfamiliar with the SImpleHTTPServer module), create a file called <something>.py (replace <something> with whatever you want) and make the contents of the file the following:
    import SimpleHTTPServer
    import SocketServer
    PORT = 8000
    Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
    httpd = SocketServer.TCPServer(("", PORT), Handler)
    print "serving at port", PORT
    Execute that by executing
    python <something>.py
    Put your html docs in the directory with the Python script and navigate to http://localhost:8000 (change the port if you change it in the script).
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. I dont' have permission to view my WD passport for Mac contents...
    By themightypaintr in forum Apple Notebooks
    Replies: 3
    Last Post: 05-25-2015, 07:24 AM
  2. Deleting a file: permission denied
    By muon in forum OS X - Operating System
    Replies: 2
    Last Post: 08-15-2014, 02:32 PM
  3. insufficient permission to access file
    By leangk in forum OS X - Operating System
    Replies: 2
    Last Post: 08-03-2010, 08:52 AM
  4. at sign @ in file permission
    By fareal in forum OS X - Operating System
    Replies: 1
    Last Post: 12-20-2008, 05:57 PM
  5. File permission errors!
    By PowerBookG4 in forum Web Design and Hosting
    Replies: 3
    Last Post: 03-22-2008, 05:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts