Results 1 to 8 of 8
  1. #1
    Apache File Permissions?

    Member Since
    Sep 30, 2009
    Posts
    5
    Apache File Permissions?
    Hi - I am trying to learn HTML, I have apache enabled on my macbook pro and I am able to create some basic pages with text, but when i try to put an image on my page i get a "Forbidden - You don't have permission to access /ImageName.jpg on this server." message. Can someone help me set the proper permissions???

    Thanks
    James

  2. #2
    Apache File Permissions?
    Ekim's Avatar
    Member Since
    Sep 24, 2009
    Location
    New York
    Posts
    146
    Specs:
    MBP - 15in, 2.66ghz, 8gb RAM, 2x GPU, 320gb HDD
    Where is the image located? If its located off-site (not locally) are you sure you should have permissions to it? If it is stored locally, are you logged into the admin account, or do you have admin permissions with the account you are logged into?

  3. #3
    Apache File Permissions?

    Member Since
    Sep 30, 2009
    Posts
    5
    Since i am just practicing, it is stored locally (HD->Library->webserver->Documents->Images) and I am not sure what I am logged in as? I just made the switch to mac from PC so i am not sure how user permissions work.....when i set up my computer for the first time i created a user/pass for myself i guess i would ASSUME that i am not logged in as admin

  4. #4
    Apache File Permissions?
    Ekim's Avatar
    Member Since
    Sep 24, 2009
    Location
    New York
    Posts
    146
    Specs:
    MBP - 15in, 2.66ghz, 8gb RAM, 2x GPU, 320gb HDD
    If you're using just the default account then yes you have admin permissions.. hmm.. are you using the correct file path? I dont know how you stored your files, but if you store your .html files in documents and are trying to access your images it should look something like this:

    <img src="../Images/ImageName.jpg" />

    Also, you may have changed some permissions without know it... so if you go to Applications/utilities/disk utilities/ then select the startup volume and click first aid tab, then click repair disk permissions button. Hopefully that helps

  5. #5
    Apache File Permissions?

    Member Since
    Sep 30, 2009
    Posts
    5
    hmmm i tried both options and neither have worked...any thoughts?

  6. #6
    Apache File Permissions?
    Unibody's Avatar
    Member Since
    May 31, 2009
    Location
    Vancouver, Canada
    Posts
    203
    Specs:
    15" Unibody (Jan 09)
    Open up Terminal in /Applications/Utilities and type:

    Code:
    chmod -R 777 /Library/WebServer/Documents
    Then press enter.
    That should do it, if not:

    Code:
    sudo chmod -R 777 /Library/WebServer/Documents

  7. #7
    Apache File Permissions?

    Member Since
    Sep 30, 2009
    Posts
    5
    Thank you the second one worked!!!

    btw what is different about the second one, using 'sudo'? i tried the first one without it and it didnt work...

  8. #8
    Apache File Permissions?
    Unibody's Avatar
    Member Since
    May 31, 2009
    Location
    Vancouver, Canada
    Posts
    203
    Specs:
    15" Unibody (Jan 09)
    "sudo" means "run as administrator".

    "chmod" means "change permissions to..."
    "777" means "allow all to read and write"
    "-R" means "recursive"
    And the last part is the location.


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. File permissions
    By shauncytheboom in forum Other Hardware and Peripherals
    Replies: 2
    Last Post: 04-17-2012, 05:01 PM
  2. Can't change file permissions on download file.
    By guitarocker100 in forum OS X - Operating System
    Replies: 0
    Last Post: 01-09-2010, 09:25 PM
  3. File Vault vs Apache + Sites Folder
    By davidsword in forum OS X - Operating System
    Replies: 12
    Last Post: 11-19-2009, 01:42 PM
  4. Tutorial: How to make Apache's file indexing page less boring
    By Unibody in forum Web Design and Hosting
    Replies: 0
    Last Post: 05-31-2009, 07:03 PM
  5. file permissions?
    By stevescivic in forum OS X - Operating System
    Replies: 2
    Last Post: 10-11-2006, 10:45 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
  •