Linux за българи: Форуми

BSD секция => Настройки на софтуер => Темата е започната от: myrla1 в Jan 08, 2007, 12:15



Титла: Apache+symbolic links
Публикувано от: myrla1 в Jan 08, 2007, 12:15
Здравейте,

  Дигнах си наскоро Apache/1.3.29+php5 на OpenBSD 3.9 и се сблъсках с следния проблем:

  Искам, освен неговата си /htdocs, да ползвам и друга директория която съм направила /home/apache.
  Дадох правата на втората на www усера и chmod 0777 -> достъпна за всички и създадох линк в /htdocs - /test -> който сочи към /home/apache. В /home/apache имам index.html.
  В http.conf имам включена опцията Options FollowSymLinks за DocumentRoot, но
  http://127.0.0.1/test казва:
"The requested URL /test was not found on this server."
  В error.log казва:
"File does not exist: /htdocs/test"

Всичко сложено в /htdocs си го чете без проблем но symbolic links не работят. Някой имал ли е подобен проблем? Ако знаете решение моля споделете.

Поздрави


Титла: Apache+symbolic links
Публикувано от: Hapkoc в Jan 08, 2007, 12:25
От httpd(8):

Цитат
    By default, httpd will chroot(2) to the ``ServerRoot'' path, serving doc-
     uments from the ``DocumentRoot'' path.  As a result of the default secure
     behaviour, httpd cannot access any objects outside ``ServerRoot'' - this
     security measure is taken in case httpd is compromised.  This is not
     without drawbacks, though:

     CGI programs may fail due to the limited environment available inside
     this chroot space.  ``UserDir'', of course, cannot access files outside
     the directory space.  Other modules will also have issues.
     ``DocumentRoot'' directories or any other files needed must be inside
     ``ServerRoot''.  For this to work, pathnames inside the configuration
     file do not need adjustment relative to ``ServerRoot''.  For this option
     to remain secure, it is important that no files or directories writable
     by user www or group www are created inside the ``ServerRoot''.

     The -u option (see below) can be specified to disable chroot(2) function-
     ality.


Титла: Apache+symbolic links
Публикувано от: myrla1 в Jan 08, 2007, 12:58
Аха, точно това беше, благодаря Наркос :)


Титла: Apache+symbolic links
Публикувано от: Hapkoc в Jan 08, 2007, 16:53
Моля, моля. :)

При настройка на OpenBSD е добре да се има предвид, че основния акцент при тази операционна система е върху сигурността. Именно по тази причина повечето услуги, които са в базовата система и за които е удачно по подразбиране се стартират в chroot затвор.