New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

Apache File Permissions?


Post Reply New Thread Subscribe

 
Thread Tools
jamesmerr

 
Member Since: Sep 30, 2009
Posts: 5
jamesmerr is on a distinguished road

jamesmerr is offline
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
QUOTE Thanks
Ekim

 
Ekim's Avatar
 
Member Since: Sep 24, 2009
Location: New York
Posts: 146
Ekim is an unknown at this point
Mac Specs: MBP - 15in, 2.66ghz, 8gb RAM, 2x GPU, 320gb HDD

Ekim is offline
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?
QUOTE Thanks
jamesmerr

 
Member Since: Sep 30, 2009
Posts: 5
jamesmerr is on a distinguished road

jamesmerr is offline
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
QUOTE Thanks
Ekim

 
Ekim's Avatar
 
Member Since: Sep 24, 2009
Location: New York
Posts: 146
Ekim is an unknown at this point
Mac Specs: MBP - 15in, 2.66ghz, 8gb RAM, 2x GPU, 320gb HDD

Ekim is offline
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
QUOTE Thanks
jamesmerr

 
Member Since: Sep 30, 2009
Posts: 5
jamesmerr is on a distinguished road

jamesmerr is offline
hmmm i tried both options and neither have worked...any thoughts?
QUOTE Thanks
Unibody

 
Unibody's Avatar
 
Member Since: May 31, 2009
Location: Vancouver, Canada
Posts: 203
Unibody will become famous soon enough
Mac Specs: 15" Unibody (Jan 09)

Unibody is offline
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
QUOTE Thanks
jamesmerr

 
Member Since: Sep 30, 2009
Posts: 5
jamesmerr is on a distinguished road

jamesmerr is offline
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...
QUOTE Thanks
Unibody

 
Unibody's Avatar
 
Member Since: May 31, 2009
Location: Vancouver, Canada
Posts: 203
Unibody will become famous soon enough
Mac Specs: 15" Unibody (Jan 09)

Unibody is offline
"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.

QUOTE Thanks

Post Reply New Thread Subscribe


« Disable the ability of browsers to cache my website | Mac Mini Server »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Deleting Hidden files... ldj OS X - Operating System 15 03-16-2013 12:24 PM
Mass Change Folder and File Permissions jskwarek Switcher Hangout 7 03-05-2010 03:03 PM
File Vault vs Apache + Sites Folder davidsword OS X - Operating System 12 11-19-2009 02:42 PM
Windows 2003 File Server & Quark kegwell OS X - Operating System 0 01-15-2007 03:35 PM
Show Item Info inflexion OS X - Operating System 15 10-24-2005 11:34 PM

All times are GMT -4. The time now is 05:37 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?