The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Networking (http://hintsforums.macworld.com/forumdisplay.php?f=14)
-   -   problems setting up web hosting on mac (http://hintsforums.macworld.com/showthread.php?t=114781)

acme 11-09-2010 03:46 PM

problems setting up web hosting on mac
 
I'm using the help file "Hosting a website on your computer" so that I can use my wife's PC to look at web coding I do on my G4 Mini. Both machines are connected to the same ethernet router/hub and I want to proof my work locally; without loading it up to my site, etc.

after following what the above help file says to do, I get a box saying:

You don't have permission to access /~username/ on this server

^^ I get this from my wife's PC and from the very same Mac which is hosting the web pages!

Any clues what I've done wrong in setting this up?

thanks!

a

acme.mail.order 11-09-2010 06:11 PM

Make sure the folders in question are readable by others, and that directories are executable by others.
In the terminal, it's:

chmod -R o+r /Users/username/Sites
chmod +x /Users/username/Sites

acme 11-09-2010 06:27 PM

thank you, acme..I typed those commands in a terminal window (inserting my actual user name in place of "username") and I get the same "not enough permissions" dialog box.

is there something more I need to do to that folder to make it more cooperative?

thanks!

a

acme.mail.order 11-09-2010 06:30 PM

Post the results of:

ls -lO /Users/username

--and--

ls -lO /Users/username/Sites

When you paste the results use the [code]paste here[/code] tags so it's readable.

acme 11-09-2010 06:52 PM

here you go, acme.mail.order:


Code:

dash-mini:~ dash$ ls -10 /Users/dash
ls: illegal option -- 0
usage: ls [-ABCFGHLPRSTWZabcdefghiklmnopqrstuwx1] [file ...]
dash-mini:~ dash$



--and--

dash-mini:~ dash$ ls -10 /Users/dash/Sites
ls: illegal option -- 0
usage: ls [-ABCFGHLPRSTWZabcdefghiklmnopqrstuwx1] [file ...]
dash-mini:~ dash$


acme.mail.order 11-09-2010 07:09 PM

That's a capital letter O, not a zero.

acme 11-09-2010 07:16 PM

sorry. I can't type it more as an "O" than this...looks like same results:

Code:


dash-mini:~ dash$ ls -lO /Users/dash
ls: illegal option -- O
usage: ls [-ABCFGHLPRSTWZabcdefghiklmnopqrstuwx1] [file ...]
dash-mini:~ dash$

-- and  --

dash-mini:~ dash$ ls -lO /Users/dash/Sites
ls: illegal option -- O
usage: ls [-ABCFGHLPRSTWZabcdefghiklmnopqrstuwx1] [file ...]
dash-mini:~ dash$


acme.mail.order 11-09-2010 07:43 PM

Leave off the O then - it's not hugely necessary. Which OS are you using?

acme 11-09-2010 07:46 PM

OS X Tiger.

the help file doesn't give any hint that these gyrations are needed; it's pretty much a 1-2-3, A-B-C set up process according to what I read in that...is my whole system hosed or what?

thanks for hangin in there with me, acme.mail.order

Code:

dash-mini:~ dash$ ls -l /Users/dash
total 16
-rw-------    1 dash  dash  5816 Aug 26  2009 Adobe SVG 3.0 Installer Log
drwx------    5 dash  dash  170 Mar  3  2010 Applications
drwx------    9 dash  dash  306 Nov  9 16:19 Desktop
drwx------  59 dash  dash  2006 Nov  9 11:29 Documents
drwxr-xr-x    3 dash  dash  102 Jul 30 15:46 Downloads
drwx------  53 dash  dash  1802 Nov  5 11:05 Library
drwx------    5 dash  dash  170 Mar 24  2010 Movies
drwx------    6 dash  dash  204 Feb 22  2010 Music
drwx------    7 dash  dash  238 Apr 18  2010 Pictures
drwxr-xr-x    5 dash  dash  170 Feb 22  2010 Public
drwxr-xr-x    8 dash  dash  272 Nov  9 16:34 Sites
drwxr-xr-x    2 dash  dash    68 Mar  4  2010 iMacros
dash-mini:~ dash$



-- and --

dash-mini:~ dash$ ls -l /Users/dash/Sites
total 16
drwxr-xr-x  6 dash  dash  204 Nov  9 13:52 graphic elements
-rw-r--r--  1 dash  dash  876 Nov  9 16:34 index.html
drwxr-xr-x  5 dash  dash  170 Nov  9 16:37 pix
-rw-r--r--  1 dash  dash  912 Nov  9 16:31 test.css
dash-mini:~ dash$


acme.mail.order 11-09-2010 07:48 PM

The gyrations are usually not needed, but if you have done things slighly unusual it's fairly easy to lock it up. The alternatives eventually turn into Windows.

acme 11-09-2010 07:49 PM

OK..I went back in to the post right before yours and added the code.

the results appear to me to be what we're after.


a

acme.mail.order 11-09-2010 07:53 PM

Permissions look fine. What happens when you try to load a file directly?:

http://addressofmac.local/~dash/index.html

or from the same box:

http://localhost/~dash/index.html

acme 11-09-2010 07:59 PM

Quote:

Originally Posted by acme.mail.order (Post 600545)
Permissions look fine. What happens when you try to load a file directly?:

http://addressofmac.local/~dash/index.html

or from the same box:

http://localhost/~dash/index.html

both produce a "Forbidden" page as before.

Forbidden

You don't have permission to access /~dash/index.html on this server.
Apache/1.3.41 Server at dash-mini.local Port 80

the address I use is my computer's website address as given by the Sharing>services tab

a

acme.mail.order 11-09-2010 08:00 PM

And you really should upgrade to Leapord

acme.mail.order 11-09-2010 08:02 PM

Lets check the parent folder then:

ls -l /Users

acme 11-09-2010 08:04 PM

Quote:

Originally Posted by acme.mail.order (Post 600547)
And you really should upgrade to Leapord

perhaps, but is there a reason I can't do it in Tiger?

All I'm doing here is enabling a folder and a couple of files to be seen by other computers that are pointed to it, right?

acme 11-09-2010 08:07 PM

here's the result of that last command you suggested I type:

Code:

dash-mini:~ dash$ ls -l /Users
total 0
drwxrwxrwt  27 root  wheel  918 Oct 26 15:00 Shared
drwx------  38 dash  dash  1292 Nov  8 08:43 dash
drwxr-xr-x  12 test  test    408 Sep  4 19:15 test
dash-mini:~ dash$


acme.mail.order 11-09-2010 08:15 PM

chmod 755 /Users/dash

acme 11-09-2010 08:23 PM

OK, That last bit of code straightened things out for the local Mac and for the PC on the same Ethernet router hub.

Many thanks!

Would you mind explaining what was wrong and what your code did to fix it? that 755 looks like it's about read/write privileges, so somehow they got messed up.

I have no idea how that could have happened, since I haven't used Sites on this install of OS X.

maybe if I have a sense of what the problem was, I can be aware of it in future and avoid doing whatever I might have done, or at least know how to fix it.

acme

acme.mail.order 11-09-2010 08:36 PM

Have you ever moved / copied / imported that particular user from another machine?

acme 11-09-2010 09:30 PM

yeah, you could say that...about a year and a half ago, I did a fresh installation, got everything just so, then carbon copy cloned it, so whenever I need that installation, I can easily have it, and simply have to re-add the most recent backup of my User ƒ.

I guess that explains that.

a


All times are GMT -5. The time now is 08:19 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.