Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Help: Apache Web server
@ 2000-09-19  4:00 Pixel
  2000-09-19  4:00 ` sideband
  0 siblings, 1 reply; 17+ messages in thread
From: Pixel @ 2000-09-19  4:00 UTC (permalink / raw)


I am having trouble trying to set up the Apache web server on RH Linux 6.2.
It seems to be working fine if I type in the address of the machine, such as
192.168.0.8 in my web browser on another workstation. Having a user such as
joeblow, I try to access the "users" page by typing in 192.168.0.8/~jowblow,
but the server returns

Forbidden

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

_______________________________________________________________
Apache/1.3.12 Server at localhost.localdomain Port 80

Thank you if you can help me figure out what I need to do....

Regards,

Pixel





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19  4:00 Help: Apache Web server Pixel
@ 2000-09-19  4:00 ` sideband
  2000-09-19  4:00   ` Pixel
  2000-09-19  4:00   ` Marble Head
  0 siblings, 2 replies; 17+ messages in thread
From: sideband @ 2000-09-19  4:00 UTC (permalink / raw)


try the following commands as root

cd /home
chmod -R 755 <user>   [repeat for all users to be given webpage
access.]
chown -R <user> <user>
chgrp -R <group> <user>

HTH 

-SSB

On or about Tue, 19 Sep 2000 18:26:14 +1000, "Pixel"
<pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
say:

:I am having trouble trying to set up the Apache web server on RH Linux 6.2.
:It seems to be working fine if I type in the address of the machine, such as
:192.168.0.8 in my web browser on another workstation. Having a user such as
:joeblow, I try to access the "users" page by typing in 192.168.0.8/~jowblow,
:but the server returns
:
:Forbidden
:
:You don't have permission to access /~jowblow on this server.
:
:_______________________________________________________________
:Apache/1.3.12 Server at localhost.localdomain Port 80
:
:Thank you if you can help me figure out what I need to do....
:
:Regards,
:
:Pixel
:




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19  4:00 ` sideband
@ 2000-09-19  4:00   ` Pixel
  2000-09-19  4:00     ` sideband
  2000-09-19  4:00   ` Marble Head
  1 sibling, 1 reply; 17+ messages in thread
From: Pixel @ 2000-09-19  4:00 UTC (permalink / raw)



sideband <sideband@cac.net> wrote in message
news:nkbess8emkiiac2kadtltaera4p18ech00@4ax.com...
> try the following commands as root
>
> cd /home
> chmod -R 755 <user>   [repeat for all users to be given webpage
> access.]
> chown -R <user> <user>
> chgrp -R <group> <user>
>
> HTH
>
> -SSB
>
> On or about Tue, 19 Sep 2000 18:26:14 +1000, "Pixel"
> <pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
> say:
>
> :I am having trouble trying to set up the Apache web server on RH Linux
6.2.
> :It seems to be working fine if I type in the address of the machine, such
as
> :192.168.0.8 in my web browser on another workstation. Having a user such
as
> :joeblow, I try to access the "users" page by typing in
192.168.0.8/~jowblow,
> :but the server returns
> :
> :Forbidden
> :
> :You don't have permission to access /~jowblow on this server.
> :
> :_______________________________________________________________
> :Apache/1.3.12 Server at localhost.localdomain Port 80
> :
> :Thank you if you can help me figure out what I need to do....
> :
> :Regards,
> :
> :Pixel


Thanks, seems I didn't realise the problem was all the way up to the users
home directory, in terms of it's permissions. Seems to be working, but since
I don't have a registered domain name yet, it tries to look up a
non-existent name. Just using the LAN private IP for testing purposes.

Thanks for your advice.

Regards.

Pixel





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19  4:00   ` Pixel
@ 2000-09-19  4:00     ` sideband
  2000-09-19 14:12       ` Pixel
  2000-09-19 14:14       ` Pixel
  0 siblings, 2 replies; 17+ messages in thread
From: sideband @ 2000-09-19  4:00 UTC (permalink / raw)


On or about Tue, 19 Sep 2000 21:42:48 +1000, "Pixel"
<pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
say:
:Thanks, seems I didn't realise the problem was all the way up to the users
:home directory, in terms of it's permissions. Seems to be working, but since
:I don't have a registered domain name yet, it tries to look up a
:non-existent name. Just using the LAN private IP for testing purposes.
:
:Thanks for your advice.
:
:Regards.
:
:Pixel
:

That is one possible solution. There might be other problems as well.
This particular fix solved the same problem I had a couple years ago
setting up apache, so I just forwarded that on. If, after doing this,
it still denies access, then its time to take a good long hard look at
the Apache configuration.

HTH

-SSB



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19 14:14       ` Pixel
@ 2000-09-19  4:00         ` sideband
  0 siblings, 0 replies; 17+ messages in thread
From: sideband @ 2000-09-19  4:00 UTC (permalink / raw)


Then you need to edit the apache config and set up a server name.
Whatever you have the machine's IP named on your DNS, name the server
that, for now, until you get your "real" domain name. Should work, for
now.

-SSB

On or about Wed, 20 Sep 2000 00:14:56 +1000, "Pixel"
<pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
say:

:
:sideband <sideband@cac.net> wrote in message
:news:4ohesssibngghd66djcnjgc7ik6m9n36jv@4ax.com...
:> On or about Tue, 19 Sep 2000 21:42:48 +1000, "Pixel"
:> <pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
:> say:
:> :Thanks, seems I didn't realise the problem was all the way up to the
:users
:> :home directory, in terms of it's permissions. Seems to be working, but
:since
:> :I don't have a registered domain name yet, it tries to look up a
:> :non-existent name. Just using the LAN private IP for testing purposes.
:> :
:> :Thanks for your advice.
:> :
:> :Regards.
:> :
:> :Pixel
:> :
:>
:> That is one possible solution. There might be other problems as well.
:> This particular fix solved the same problem I had a couple years ago
:> setting up apache, so I just forwarded that on. If, after doing this,
:> it still denies access, then its time to take a good long hard look at
:> the Apache configuration.
:>
:> HTH
:>
:> -SSB
:
:
:By the way the Apache configuration is pretty much at it's default.
:




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19  4:00 ` sideband
  2000-09-19  4:00   ` Pixel
@ 2000-09-19  4:00   ` Marble Head
  2000-09-20  3:59     ` Pixel
  2000-09-20  4:00     ` Mamata Desai
  1 sibling, 2 replies; 17+ messages in thread
From: Marble Head @ 2000-09-19  4:00 UTC (permalink / raw)


I've done this before, too, and it works fine, except...
Because you're changing to 755, you're giving access to all users on the machine.

Is there any way to let the daemon reach the public_html folder without giving
access to other users?

sideband wrote:

> try the following commands as root
>
> cd /home
> chmod -R 755 <user>   [repeat for all users to be given webpage
> access.]
> chown -R <user> <user>
> chgrp -R <group> <user>
>
> HTH
>
> -SSB
>
> On or about Tue, 19 Sep 2000 18:26:14 +1000, "Pixel"
> <pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
> say:
>
> :I am having trouble trying to set up the Apache web server on RH Linux 6.2.
> :It seems to be working fine if I type in the address of the machine, such as
> :192.168.0.8 in my web browser on another workstation. Having a user such as
> :joeblow, I try to access the "users" page by typing in 192.168.0.8/~jowblow,
> :but the server returns
> :
> :Forbidden
> :
> :You don't have permission to access /~jowblow on this server.
> :
> :_______________________________________________________________
> :Apache/1.3.12 Server at localhost.localdomain Port 80
> :
> :Thank you if you can help me figure out what I need to do....
> :
> :Regards,
> :
> :Pixel
> :




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19  4:00     ` sideband
@ 2000-09-19 14:12       ` Pixel
  2000-09-19 14:14       ` Pixel
  1 sibling, 0 replies; 17+ messages in thread
From: Pixel @ 2000-09-19 14:12 UTC (permalink / raw)



sideband <sideband@cac.net> wrote in message
news:4ohesssibngghd66djcnjgc7ik6m9n36jv@4ax.com...
> On or about Tue, 19 Sep 2000 21:42:48 +1000, "Pixel"
> <pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
> say:
> :Thanks, seems I didn't realise the problem was all the way up to the
users
> :home directory, in terms of it's permissions. Seems to be working, but
since
> :I don't have a registered domain name yet, it tries to look up a
> :non-existent name. Just using the LAN private IP for testing purposes.
> :
> :Thanks for your advice.
> :
> :Regards.
> :
> :Pixel
> :
>
> That is one possible solution. There might be other problems as well.
> This particular fix solved the same problem I had a couple years ago
> setting up apache, so I just forwarded that on. If, after doing this,
> it still denies access, then its time to take a good long hard look at
> the Apache configuration.
>
> HTH
>
>
No it doesn't deny access, for some reason it tries looks up
"localhost.localdomain" which doesn't exist. I have left the hostname
settings alone for now... Unless you know of a workaround to this...




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19  4:00     ` sideband
  2000-09-19 14:12       ` Pixel
@ 2000-09-19 14:14       ` Pixel
  2000-09-19  4:00         ` sideband
  1 sibling, 1 reply; 17+ messages in thread
From: Pixel @ 2000-09-19 14:14 UTC (permalink / raw)



sideband <sideband@cac.net> wrote in message
news:4ohesssibngghd66djcnjgc7ik6m9n36jv@4ax.com...
> On or about Tue, 19 Sep 2000 21:42:48 +1000, "Pixel"
> <pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
> say:
> :Thanks, seems I didn't realise the problem was all the way up to the
users
> :home directory, in terms of it's permissions. Seems to be working, but
since
> :I don't have a registered domain name yet, it tries to look up a
> :non-existent name. Just using the LAN private IP for testing purposes.
> :
> :Thanks for your advice.
> :
> :Regards.
> :
> :Pixel
> :
>
> That is one possible solution. There might be other problems as well.
> This particular fix solved the same problem I had a couple years ago
> setting up apache, so I just forwarded that on. If, after doing this,
> it still denies access, then its time to take a good long hard look at
> the Apache configuration.
>
> HTH
>
> -SSB


By the way the Apache configuration is pretty much at it's default.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19  4:00   ` Marble Head
@ 2000-09-20  3:59     ` Pixel
  2000-09-20  4:00       ` sideband
  2000-09-21  4:00       ` Sally Woolrich
  2000-09-20  4:00     ` Mamata Desai
  1 sibling, 2 replies; 17+ messages in thread
From: Pixel @ 2000-09-20  3:59 UTC (permalink / raw)



Marble Head <Marble.Head@nospam.guacamole.com> wrote in message
news:39C7AFF1.DECEEC28@nospam.guacamole.com...
> I've done this before, too, and it works fine, except...
> Because you're changing to 755, you're giving access to all users on the
machine.
>
> Is there any way to let the daemon reach the public_html folder without
giving
> access to other users?
>
> sideband wrote:
>
> > try the following commands as root
> >
> > cd /home
> > chmod -R 755 <user>   [repeat for all users to be given webpage
> > access.]
> > chown -R <user> <user>
> > chgrp -R <group> <user>

Yeah that's a good point there. Even though other users can't delete files,
they still can access private files.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-20  3:59     ` Pixel
@ 2000-09-20  4:00       ` sideband
  2000-09-21  4:00       ` Sally Woolrich
  1 sibling, 0 replies; 17+ messages in thread
From: sideband @ 2000-09-20  4:00 UTC (permalink / raw)


Well, there is one solution..

Have the users make their own directory under /home/user, and chmod
700 that dir, and everything below it, if they want to keep things
private. In order for Apache to read public_html, "nobody" needs to be
able to read /home/user and /home/user/public_html

Now, there might be something out there that I don't know about. I'm
not Mr Expert Know-It-All-About-Everything. I could be wrong.

-SSB

On or about Wed, 20 Sep 2000 13:59:30 +1000, "Pixel"
<pixelised@hotmail(DOT)com>, using the forum comp.os.linux.alpha did
say:

:
:Marble Head <Marble.Head@nospam.guacamole.com> wrote in message
:news:39C7AFF1.DECEEC28@nospam.guacamole.com...
:> I've done this before, too, and it works fine, except...
:> Because you're changing to 755, you're giving access to all users on the
:machine.
:>
:> Is there any way to let the daemon reach the public_html folder without
:giving
:> access to other users?
:>
:> sideband wrote:
:>
:> > try the following commands as root
:> >
:> > cd /home
:> > chmod -R 755 <user>   [repeat for all users to be given webpage
:> > access.]
:> > chown -R <user> <user>
:> > chgrp -R <group> <user>
:
:Yeah that's a good point there. Even though other users can't delete files,
:they still can access private files.
:




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-19  4:00   ` Marble Head
  2000-09-20  3:59     ` Pixel
@ 2000-09-20  4:00     ` Mamata Desai
  2000-09-21  4:00       ` Marble Head
  1 sibling, 1 reply; 17+ messages in thread
From: Mamata Desai @ 2000-09-20  4:00 UTC (permalink / raw)


In comp.unix.questions Marble Head <Marble.Head@nospam.guacamole.com> wrote:
> Because you're changing to 755, you're giving access to all users on 
> the machine.
> Is there any way to let the daemon reach the public_html folder without giving
> access to other users?
>> try the following commands as root
>>
>> cd /home
>> chmod -R 755 <user>   [repeat for all users to be given webpage
>> access.]
>> chown -R <user> <user>
>> chgrp -R <group> <user>

cd /home
chmod 711 ~user
chmod 755 ~user/public_html
chmod 644 ~user/public_html/<files/here>
chmod 755 ~user/public_html/<dirs/here>

-- 
Bye,
mamata



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-20  3:59     ` Pixel
  2000-09-20  4:00       ` sideband
@ 2000-09-21  4:00       ` Sally Woolrich
  1 sibling, 0 replies; 17+ messages in thread
From: Sally Woolrich @ 2000-09-21  4:00 UTC (permalink / raw)


On Wed, 20 Sep 2000 04:59:30 +0100, "Pixel"
<pixelised@hotmail(DOT)com> wrote:

>
>Marble Head <Marble.Head@nospam.guacamole.com> wrote in message
>news:39C7AFF1.DECEEC28@nospam.guacamole.com...
>> I've done this before, too, and it works fine, except...
>> Because you're changing to 755, you're giving access to all users on the
>machine.
>>
>> Is there any way to let the daemon reach the public_html folder without
>giving
>> access to other users?
>>
>> sideband wrote:
>>
>> > try the following commands as root
>> >
>> > cd /home
>> > chmod -R 755 <user>   [repeat for all users to be given webpage
>> > access.]
>> > chown -R <user> <user>
>> > chgrp -R <group> <user>
>
>Yeah that's a good point there. Even though other users can't delete files,
>they still can access private files.
>

Surely the only user (other than the owner) which needs to be able to
read the stuff is the apache user - assuming you are running the
daemon as user apache. 




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-20  4:00     ` Mamata Desai
@ 2000-09-21  4:00       ` Marble Head
  2000-09-22  0:11         ` James T. Dennis
  2000-09-23  4:00         ` Gunnar Gaubatz
  0 siblings, 2 replies; 17+ messages in thread
From: Marble Head @ 2000-09-21  4:00 UTC (permalink / raw)


> cd /home
> chmod 711 ~user
> chmod 755 ~user/public_html
> chmod 644 ~user/public_html/<files/here>
> chmod 755 ~user/public_html/<dirs/here>

Have you tried this?

It doesn't seem to make sense to me.  Why the ~ in front of user?  Is that a special
folder somebody created, or is it part of their login name, or a type-o, or
something I don't understand?
Also, on my system, in order for httpd to reach the /home/joeuser/public_html/*
files, all of those paths needed to be read and execute permissions, in other words,
755.

Here's another idea:
In the apache configuration files somewhere, there must be a setting that tells it
"When you get a request for http://www.domain.com/~user, look in the
/home/user/public_html folder," because not every system puts the users under /home.

So that setting must be changeable, for example, to /home/personalpages/user.
If the users want the public_html folder in their regular /home/user folder, make a
softlink.

Allow the full 755 permissions on /home/personalpages, because if it's public anyway
(accessible through http://www.domain.com/~user) then who will be upset that
somebody read it?  And you still can preserve normal permissions on your /home/user
folder.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-21  4:00       ` Marble Head
@ 2000-09-22  0:11         ` James T. Dennis
  2000-09-23  4:00         ` Gunnar Gaubatz
  1 sibling, 0 replies; 17+ messages in thread
From: James T. Dennis @ 2000-09-22  0:11 UTC (permalink / raw)


In comp.os.linux.alpha Marble Head <Marble.Head@nospam.guacamole.com> wrote:

>> cd /home
>> chmod 711 ~user
>> chmod 755 ~user/public_html
>> chmod 644 ~user/public_html/<files/here>
>> chmod 755 ~user/public_html/<dirs/here>

> Have you tried this?

> It doesn't seem to make sense to me.  Why the ~ in front of user?  
> Is that a special folder somebody created, or is it part of 
> their login name, or a type-o, or something I don't understand?


 It's something you don't understand.  It's also pretty basic
 UNIX/Linux so it is generally assumed that users will understand
 it.  From most (almost all) UNIX shells (command line interpreters/
 interfaces) the ~ (tilde or "twiddle") is an abbreviation for
 "the home directory of."  So ~/foo is the "foo" file or directory
 under (the current user's) home directory.  ~foo/bar is "the 
 bar file or directory under the home directory of the user named
 "foo."  (Note that "foo" and "bar" are traditional "meta variables"
 --- the are used in examples just the way that you math teacher 
 might have used "a" and "b").

 In common URL usage the ~ has a similar meaning.  The NCSA 
 Apache and many other web servers are configured to take a 
 URL of the form ~foo (as in http://somewhere.not/~foo/bar.html)
 and expand it to "the public_html directory under the home
 directory of user foo."  This is a slightly different but
 rather "intuitive" interpretation to people who are used to
 the common UNIX meaning of the ~.  Considering  that the 
 web and the Inernet were primarily developed by UNIX programmers
 and users this makes alot of sense.

 It's possible that your web server may be configured to 
 treat ~ characters in URLs differently.  For example I usually 
 configure my systems to use ~*/.web/ instead of ~*/public_html/
 as "the user's web files."  That's because I prefer the shorter
 name and I don't need to see my "web" directory tree every time
 I do an ls in my home directory.  

 It's also possible that your web server might be configured
 to ignore the ~ completely.  Also note that it is technically
 not strictly conformant with the standards to put a ~ in a 
 URL --- it's supposed to be encoded (%7E??) though it's quite
 rare in practice.

> Also, on my system, in order for httpd to reach the 
> /home/joeuser/public_html/* files, all of those paths needed 
> to be read and execute permissions, in other words, 755.

 Should read:  "those paths need to be 'world accessible'..."

 Technically you just have to make sure that your 
 public_html directory is accessible to the web server.  The
 web server should be running under its own special user ID
 (often named "web").  You might be able to accomplish this 
 with just group permissions (mode 750 on public_html and
 possibly on your home directory as well).  However, it's 
 usually pretty unlikely that you'd want to serve web pages
 from a "public_html" directory that you would want to keep
 confidential from other local users.  It's possible to do 
 that sort of think using CGI programs and the Apache suExec
 module if you really need to.

> Here's another idea:
> In the apache configuration files somewhere, there must be a 
> setting that tells it "When you get a request for 
> http://www.domain.com/~user, look in the /home/user/public_html 
> folder," because not every system puts the users under /home.

 It is correct that there is such a setting.  However, that is 
 completely indepedent of the fact that some users might have
 home directories that are not under /home.  

 The normal UNIX mechanism for looking up a user's home 
 directory (and for matching numeric UIDs to user names, and
 for looking up other "locally public" information about any UNIX
 account is to use the getpwent() library functions.  This
 could provide a directory name under /home for one user and
 a directory under /usr/share for another, etc.  

 The getpwent() function traditionally looked through the 
 /etc/passwd file.  On modern versions of UNIX it might 
 look up information via a set of NIS maps, it might access
 a set of dbm "hash/index" files, or it might use other 
 mechanisms.  On a GNU/Linux or other GNU system (one using 
 the GNU glibc 2.x libraries) it might involve the library
 loading various .so (shared object) files and querying 
 any sort of back-end directory service (LDAP, Hesiod, etc).

 So, if the ~ feature of your web server is enabled it is 
 not likely to be doing a simple string replacement of 
 ~ with something like /home/.../public_html/ --- it's almost
 certainly doing a proper getpwent() and then appending the
 "public_html" or other directory name to the end of that.

> So that setting must be changeable, for example, to 
> /home/personalpages/user.  If the users want the public_html 
> folder in their regular /home/user folder, make a softlink.

 The web server might be configured not to follow symbolic links.

> Allow the full 755 permissions on /home/personalpages, because 
> if it's public anyway (accessible through http://www.domain.com/~user) 
> then who will be upset that somebody read it?  And you still can 
> preserve normal permissions on your /home/user folder.

 Actually it is possible (if one was using .htaccess) that one
 might want to keep "confidential" data under a ~/public_html/
 directory tree.  One news poster recently posed a question
 (I don't remember where) that described a set of patches to
 their web server that caused the web server to adopt the 
 same effective user ID as the owner of a file/directory that
 was listed in the URL.  This allegedly provided the desired
 level of additional security (although it seems quite risky
 since it might have had its own bugs that make the whole
 server MUCH more dangerous; I'd recommend a mechanism where
 the primary web server could "hand off" any ~foo/ URL requests
 to a different process (file descriptors, including those
 bound to internet domain sockets can be passed via UNIX domain 
 sockets) and have each user that wanted this sort of 
 feature running a custom process (probably running with a 
 specific supplemental group) --- that should be much safer).




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-21  4:00       ` Marble Head
  2000-09-22  0:11         ` James T. Dennis
@ 2000-09-23  4:00         ` Gunnar Gaubatz
  2000-09-23  4:00           ` Pat Gunn
  1 sibling, 1 reply; 17+ messages in thread
From: Gunnar Gaubatz @ 2000-09-23  4:00 UTC (permalink / raw)





On Thu, 21 Sep 2000, Marble Head wrote:

> > cd /home
> > chmod 711 ~user
> > chmod 755 ~user/public_html
> > chmod 644 ~user/public_html/<files/here>
> > chmod 755 ~user/public_html/<dirs/here>
> 
> Have you tried this?
Yep, it works. Believe him.

> It doesn't seem to make sense to me.  Why the ~ in front of user?  Is that a special
> folder somebody created, or is it part of their login name, or a type-o, or
> something I don't understand?
The latter. The "~" character is an abbreviation for /home/, hence ~user
means /home/user.

> Also, on my system, in order for httpd to reach the /home/joeuser/public_html/*
> files, all of those paths needed to be read and execute permissions, in other words,
> 755.
No, that is wrong. In order to reach public_html, /home/user only needs to
have the "executable/dir-access" flag set (1). Apache does not search for
the public_html directory, but changes to it assuming it is there. That's
the difference. However, if another user wants to "ls" the contents of
/home/user, then the read flag (4) must be set.

I hope this helps. If you have doubts about this, try "man chmod".

Greetings,

Gunnar

-------------------- Gunnar Gaubatz ---------------------   _
----- 87 Park Ave Apt.7, Worcester, MA 01605, U.S.A -----  / \  +
- mailto:gaubatz@wpi.edu - mailto:gunnar.gaubatz@gmx.de - |/o\| H
- Graduate student of Electrical & Computer Engineering - |###_/ \_
----------- Worcester Polytechnic Institute ------------- |__|/ # \|
                                                             -------
                                                              W P I





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-23  4:00         ` Gunnar Gaubatz
@ 2000-09-23  4:00           ` Pat Gunn
  2000-09-24  4:00             ` Gunnar Gaubatz
  0 siblings, 1 reply; 17+ messages in thread
From: Pat Gunn @ 2000-09-23  4:00 UTC (permalink / raw)


Gunnar Gaubatz wrote:
> 
> On Thu, 21 Sep 2000, Marble Head wrote:
> 
> > > cd /home
> > > chmod 711 ~user
> > > chmod 755 ~user/public_html
> > > chmod 644 ~user/public_html/<files/here>
> > > chmod 755 ~user/public_html/<dirs/here>
> >
> > Have you tried this?
> Yep, it works. Believe him.
> 
> > It doesn't seem to make sense to me.  Why the ~ in front of user?  Is that a special
> > folder somebody created, or is it part of their login name, or a type-o, or
> > something I don't understand?
> The latter. The "~" character is an abbreviation for /home/, hence ~user
> means /home/user.

Not exactly. It actually looks for the home directory in /etc/passwd (or whatever)
using getpwuid(). If your home directories arn't under /home, or if a few users have
a home directory in an odd place, the ~ notation will find and be replaced by their
home directory correctly. Try

ls ~games/

to see what I mean.

-- 
"Religion is a crutch, and only the crippled need crutches" -- Madalyn Murray
Any opinions expressed in this message do not necessarily reflect
the official position of Pat Gunn or his employer. Instead, they
reflect the official position of the reader(s).



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Help: Apache Web server
  2000-09-23  4:00           ` Pat Gunn
@ 2000-09-24  4:00             ` Gunnar Gaubatz
  0 siblings, 0 replies; 17+ messages in thread
From: Gunnar Gaubatz @ 2000-09-24  4:00 UTC (permalink / raw)



On Sat, 23 Sep 2000, Pat Gunn wrote:

> Gunnar Gaubatz wrote:
> > 
> > The latter. The "~" character is an abbreviation for /home/, hence ~user
> > means /home/user.
> 
> Not exactly. It actually looks for the home directory in /etc/passwd (or whatever)
> using getpwuid(). If your home directories arn't under /home, or if a few users have
> a home directory in an odd place, the ~ notation will find and be replaced by their
> home directory correctly. Try
> 
> ls ~games/
> 
> to see what I mean.

You're right. I didn't mean the literal string "/home/", but rather the
location of the home directory. I figured it would be easier to understand
this way, since most people have their homedir in /home/.

Greetings,

Gunnar



-------------------- Gunnar Gaubatz ---------------------   _
----- 87 Park Ave Apt.7, Worcester, MA 01605, U.S.A -----  / \  +
- mailto:gaubatz@wpi.edu - mailto:gunnar.gaubatz@gmx.de - |/o\| H
- Graduate student of Electrical & Computer Engineering - |###_/ \_
----------- Worcester Polytechnic Institute ------------- |__|/ # \|
                                                             -------
                                                              W P I





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2000-09-24  4:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-09-19  4:00 Help: Apache Web server Pixel
2000-09-19  4:00 ` sideband
2000-09-19  4:00   ` Pixel
2000-09-19  4:00     ` sideband
2000-09-19 14:12       ` Pixel
2000-09-19 14:14       ` Pixel
2000-09-19  4:00         ` sideband
2000-09-19  4:00   ` Marble Head
2000-09-20  3:59     ` Pixel
2000-09-20  4:00       ` sideband
2000-09-21  4:00       ` Sally Woolrich
2000-09-20  4:00     ` Mamata Desai
2000-09-21  4:00       ` Marble Head
2000-09-22  0:11         ` James T. Dennis
2000-09-23  4:00         ` Gunnar Gaubatz
2000-09-23  4:00           ` Pat Gunn
2000-09-24  4:00             ` Gunnar Gaubatz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox