PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > followsymlinks not working
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

followsymlinks not working

Réponse
 
LinkBack Outils de la discussion
Vieux 11/02/2007, 09h36   #1
Richard
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut followsymlinks not working


Please as this is driving me nuts. There follows my
sites-available/defaults file. Notice the followsymlinks option in the
root section and the "mydef" default redirection. mydef is a symbolic
link to a web in my home directory.

lrwxrwxrwx 1 root root 27 2007-02-11 09:04 mydef -> /home/richard/web

Yet when I try to access localhost I get:

"You don't have permission to access /mydef on this server."

The error log says:

"[Sun Feb 11 10:33:46 2007] [error] [client 127.0.0.1] Symbolic link not
allowed: /var/www/mydef"

Where have I gone wrong? Is something elsewhere overriding my
followsymlinks option?

(yes, I did restart apache).


,----
| NameVirtualHost *
| <VirtualHost *>
| ServerAdmin webmaster@localhost
|
| DocumentRoot /var/www/
|
| <Directory /var/www/>
| Options Indexes FollowSymLinks MultiViews
| AllowOverride None
| Order allow,deny
| Allow from all
| # Uncomment this directive is you want to see apache2's
| # default start page (in /apache2-default) when you go to /
| # RedirectMatch ^/$ /apache2-default/
| RedirectMatch ^/$ /mydef/
| </Directory>
|
| ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
| <Directory "/usr/lib/cgi-bin">
| AllowOverride None
| Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
| Order allow,deny
| Allow from all
| </Directory>
|
| ErrorLog /var/log/apache2/error.log
|
| # Possible values include: debug, info, notice, warn, error, crit,
| # alert, emerg.
| LogLevel warn
|
| CustomLog /var/log/apache2/access.log combined
| ServerSignature On
|
| Alias /doc/ "/usr/share/doc/"
| <Directory "/usr/share/doc/">
| Options Indexes MultiViews FollowSymLinks
| AllowOverride None
| Order deny,allow
| Deny from all
| Allow from 127.0.0.0/255.0.0.0 ::1/128
| </Directory>
|
| </VirtualHost>
`----


--
  Réponse avec citation
Vieux 11/02/2007, 09h53   #2
Richard
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: followsymlinks not working

Richard <rgrdev@gmail.com> writes:

> Please as this is driving me nuts. There follows my
> sites-available/defaults file. Notice the followsymlinks option in the
> root section and the "mydef" default redirection. mydef is a symbolic
> link to a web in my home directory.
>
> lrwxrwxrwx 1 root root 27 2007-02-11 09:04 mydef -> /home/richard/web
>


Problem solved *slaps head*,

"chmod 755 ~"

Q: what is the best way in linux to give permission to apache to read my
home dir but no one else?

Create a "dbfriends" group and add myself and apache to it? What is
apaches user name? www-data?

This is all new to me.
  Réponse avec citation
Vieux 11/02/2007, 10h05   #3
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: followsymlinks not working

On 2007-02-11, Richard <rgrdev@gmail.com> wrote:
> Q: what is the best way in linux to give permission to apache to read my
> home dir but no one else?


Unless you run apache as a user that can read your dirs, none. The point
is, if apache can read your dirs/files, everybody will. If you have
this kind of problems, don't put your homedir on the web. Make a directory
under the www-root, give full permissions to it (chmod 755), assign
ownership to yourself, and make a symlink _from_ your home dir to this
directory so you can write in it like it was in your home dir. No need
for the 'follow sym link' bit and maximum security: nobody will read your
home dir 'cause is not there.

Just remember to give full read permissions to all the files and dirs
you create in there (chmod 755/644).

Davide

--
A woman is an occasional pleasure but a cigar is always a smoke.
-- Julius Henry "Groucho" Marx (http://en.wikiquote.org/wiki/Groucho_Marx)
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h11.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09162 seconds with 11 queries