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 > newbie need with rights (colud someone look at this)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

newbie need with rights (colud someone look at this)

Réponse
 
LinkBack Outils de la discussion
Vieux 05/02/2008, 12h19   #1
shahin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut newbie need with rights (colud someone look at this)

Hi I am newbie,

I did setup my first Debian with apache+mysql-server and PHP, and
every thing working as I want, when type the ip address of my server
and point it to a map in /var/www I can open my test web site.


here is the problem,


I did connect to my server via ssh and then try to down load 2 files
from a site with wget


wget http://heanet.dl.sourceforge.net/sou...y-4.1.2.tar.gz


and secound one:


wget http://heanet.dl.sourceforge.net/sou...y-3.6.2.tar.gz


after download
-rw-r--r-- 1 root root 241227 2004-07-13 01:49
dummy-3.6.2.tar.gz
-rw-r--r-- 1 root root 9424 2007-07-16 21:25
dummy-4.1.2.tar.gz


when I run the
tar xzf dummy-4.1.2.tar.gz


I get this:
drwxr-xr-x 6 root root 4096 2008-02-01 13:22 dummy-4.1.2


and for


tar xzf dummy-3.6.2.tar.gz


I get this:


drwxr-xr-x 6 www-data www-data 4096 2008-02-01 13:24 dummy-3.6.2


why after runing untar one has root as owner and group and othere one
has www-data as group and ownder


here is the real problem when I move both of this 2 files to my /var/
www I can open deummy 4 in the web browser but when I try to open
dummy 3 I get this error;


Forbidden
You don't have permission to access /shahin/ on this server.


--------------------------------------------------------------------------------


Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 Server at 132.229.35.233
Port
80


I did run:


chown -R root:root dummy-3.6.2


but still not able to open it from web browser.


Any Idea what is going on here?


Thanks shahin


  Réponse avec citation
Vieux 05/02/2008, 12h31   #2
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: newbie need with rights (colud someone look at this)

On 2008-02-05, shahin <s_mortazave@hotmail.com> wrote:
> when I run the
> tar xzf dummy-4.1.2.tar.gz
> I get this:
> drwxr-xr-x 6 root root 4096 2008-02-01 13:22 dummy-4.1.2
> and for
> tar xzf dummy-3.6.2.tar.gz
> I get this:
> drwxr-xr-x 6 www-data www-data 4096 2008-02-01 13:24 dummy-3.6.2
>
> why after runing untar one has root as owner and group and othere one
> has www-data as group and ownder


Because TAR try to maintain the original permissions and users, and it
happens that in the machine where the second archive have been created
that user was www-data.

> here is the real problem when I move both of this 2 files to my /var/
> www I can open deummy 4 in the web browser but when I try to open
> dummy 3 I get this error;
>
> Forbidden
> You don't have permission to access /shahin/ on this server.


Something make me think that you don't have an 'index.html' page in that
directory and the default configuration is to not show the directory
listing. See apache's error_log.

Davide

--
Luser is always a luser. You can't educate them. That's not what God
invented education for. That's what Simon invented LART for.
--Vadim Vygonets
  Réponse avec citation
Vieux 05/02/2008, 15h18   #3
shahin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: newbie need with rights (colud someone look at this)

On 5 feb, 13:31, Davide Bianchi <davideyeahs...@onlyforfun.net> wrote:
> On 2008-02-05, shahin <s_mortaz...@hotmail.com> wrote:
>
> > when I run the
> > tar xzf dummy-4.1.2.tar.gz
> > I get this:
> > drwxr-xr-x 6 root root 4096 2008-02-01 13:22 dummy-4.1.2
> > and for
> > tar xzf dummy-3.6.2.tar.gz
> > I get this:
> > drwxr-xr-x 6 www-data www-data 4096 2008-02-01 13:24 dummy-3.6..2

>
> > why after runing untar one has root as owner and group and othere one
> > has www-data as group and ownder

>
> Because TAR try to maintain the original permissions and users, and it
> happens that in the machine where the second archive have been created
> that user was www-data.
>
> > here is the real problem when I move both of this 2 files to my /var/
> > www I can open deummy 4 in the web browser but when I try to open
> > dummy 3 I get this error;

>
> > Forbidden
> > You don't have permission to access /shahin/ on this server.

>
> Something make me think that you don't have an 'index.html' page in that
> directory and the default configuration is to not show the directory
> listing. See apache's error_log.
>
> Davide
>
> --
> Luser is always a luser. You can't educate them. That's not what God
> invented education for. That's what Simon invented LART for.
> --Vadim Vygonets


Hi Dave,

Thanks for your update,

I did chacke the /var/log/apache2 and find this:
82.92.160.33 - - [05/Feb/2008:16:09:03 +0100] "GET /shahin HTTP/1.1"
301 335 "-
" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.1.4322; .NET
CL R
2.0.50727)"
82.92.160.33 - - [05/Feb/2008:16:09:03 +0100] "GET /shahin/ HTTP/1.1"
403 307 "
-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.1.4322; .NET
C LR
2.0.50727)"

82.92.160.33 is window box that I try to open the map /var/www/shahin.

One more question I can open /var/www/cms from the same box on the
same Linux box I did check the access rights there and look like this:
-rw-r--r-- 1 www-data root 46 2007-07-16 01:31 clear.gif
drwxr-xr-x 4 www-data root 4096 2008-01-30 17:14 fileadmin
-rw-r--r-- 1 www-data root 5051 2007-07-16 01:31 _.htaccess
lrwxrwxrwx 1 www-data root 19 2008-01-30 16:58 index.php ->
typo3_src/index.php
-rw-r--r-- 1 www-data root 7087 2007-07-16 01:31 INSTALL.txt
-rw-r--r-- 1 www-data root 7695 2007-07-16 01:31 README.txt
-rw-r--r-- 1 www-data root 425 2007-07-16 01:31 RELEASE_NOTES.txt
lrwxrwxrwx 1 www-data root 15 2008-01-30 16:58 t3lib -> typo3_src/
t3lib
lrwxrwxrwx 1 www-data root 15 2008-01-30 16:58 typo3 -> typo3_src/
typo3
drwxr-xr-x 4 www-data root 4096 2008-01-30 17:14 typo3conf
lrwxrwxrwx 1 www-data root 18 2008-01-30 16:58 typo3_src -> ../
typo3_src-4.1.2
drwxr-xr-x 7 www-data root 4096 2008-01-30 17:14 typo3temp
drwxr-xr-x 5 www-data root 4096 2008-01-30 17:14 uploads

I did change the shahin permission with:
chown -R www-data:root shahin
And look like this now:

-rw-r--r-- 1 www-data root 206 2005-05-23 02:42 ChangeLog
-rw-r--r-- 1 www-data root 46 2005-05-23 02:41 clear.gif
drwxr-xr-x 5 www-data root 4096 2005-05-23 02:41 fileadmin
-rw-r--r-- 1 www-data root 4509 2005-05-23 02:41 _.htaccess
lrwxrwxrwx 1 www-data root 18 2008-02-05 16:04 index.php -> tslib/
index_ts.php
-rw-r--r-- 1 www-data root 4987 2005-05-23 02:42 INSTALL.txt
lrwxrwxrwx 1 www-data root 11 2008-02-05 16:04 media -> tslib/media
-rw-r--r-- 1 www-data root 627 2005-05-23 02:42 Package.txt
-rw-r--r-- 1 www-data root 8119 2005-05-23 02:42 README.txt
-rw-r--r-- 1 www-data root 434 2005-05-23 02:42 RELEASE_NOTES.txt
lrwxrwxrwx 1 www-data root 17 2008-02-05 16:04 showpic.php -> tslib/
showpic.php
lrwxrwxrwx 1 www-data root 15 2008-02-05 16:04 t3lib -> typo3_src/
t3lib
lrwxrwxrwx 1 www-data root 15 2008-02-05 16:04 tslib -> typo3_src/
tslib
lrwxrwxrwx 1 www-data root 15 2008-02-05 16:04 typo3 -> typo3_src/
typo3
drwxr-xr-x 3 www-data root 4096 2005-05-23 02:41 typo3conf
lrwxrwxrwx 1 www-data root 18 2008-02-05 16:04 typo3_src -> ../
typo3_src-3.8.0
drwxr-xr-x 2 www-data root 4096 2005-05-23 02:41 typo3temp
drwxr-xr-x 7 www-data root 4096 2005-05-23 02:41 uploads


As you see both /csm and /shahin now have the same rights, but still I
get the

Forbidden
You don't have permission to access /shahin/ on this server.


--------------------------------------------------------------------------------

Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 Server at 132.229.35.233 Port
80

Is any work around this issue? or I should download the tar file
othere way?

Thanks,

Shahin

  Réponse avec citation
Vieux 05/02/2008, 20h15   #4
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: newbie need with rights (colud someone look at this)

On 2008-02-05, shahin <s_mortazave@hotmail.com> wrote:
>> Something make me think that you don't have an 'index.html' page in that
>> directory and the default configuration is to not show the directory
>> listing. See apache's error_log.
>>


> I did chacke the /var/log/apache2 and find this:
> 82.92.160.33 - - [05/Feb/2008:16:09:03 +0100] "GET /shahin HTTP/1.1"
> 301 335 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
> 1.1.4322; .NET


This is not the error_log, it looks like the acces log where the
_request_ are logged, the error log should show which error is
returned.

> lrwxrwxrwx 1 www-data root 19 2008-01-30 16:58 index.php ->
> typo3_src/index.php


The index.php is a link to another file, out-of-the-box Apache
does not follow links, but this should be reported in your error_log.

> I did change the shahin permission with:
> chown -R www-data:root shahin


Doesn't matter, as long as the files are readable by everyone.

> Is any work around this issue?


First thing first: found out where is the problem. As I said, it
seems to me that you don't have an index.html file and the directory
listing is forbidden, this will be reported in the error_log, check
that.

Davide

--
You! You with the keyboard! Step away from the caps-lock key with your
hands where I can see them!
-- from a discussion board
  Réponse avec citation
Vieux 06/02/2008, 10h00   #5
shahin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: newbie need with rights (colud someone look at this)

On 5 feb, 21:15, Davide Bianchi <davideyeahs...@onlyforfun.net> wrote:
> On 2008-02-05, shahin <s_mortaz...@hotmail.com> wrote:
>
> >> Something make me think that you don't have an 'index.html' page in that
> >> directory and the default configuration is to not show the directory
> >> listing. See apache's error_log.

>
> > I did chacke the /var/log/apache2 and find this:
> > 82.92.160.33 - - [05/Feb/2008:16:09:03 +0100] "GET /shahin HTTP/1.1"
> > 301 335 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
> > 1.1.4322; .NET

>
> This is not the error_log, it looks like the acces log where the
> _request_ are logged, the error log should show which error is
> returned.
>
> > lrwxrwxrwx 1 www-data root 19 2008-01-30 16:58 index.php ->
> > typo3_src/index.php

>
> The index.php is a link to another file, out-of-the-box Apache
> does not follow links, but this should be reported in your error_log.
>
> > I did change the shahin permission with:
> > chown -R www-data:root shahin

>
> Doesn't matter, as long as the files are readable by everyone.
>
> > Is any work around this issue?

>
> First thing first: found out where is the problem. As I said, it
> seems to me that you don't have an index.html file and the directory
> listing is forbidden, this will be reported in the error_log, check
> that.
>
> Davide
>
> --
> You! You with the keyboard! Step away from the caps-lock key with your
> hands where I can see them!
> -- from a discussion board


Hi Davie,

I did find this in error.log:

[Wed Feb 06 10:55:15 2008] [error] [client 132.229.35.64] Symbolic
link not
allo wed
or link target not accessible: /var/www/shahin/index.php

Any idea?
  Réponse avec citation
Vieux 07/03/2008, 23h57   #6
Cameron Walsh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: newbie need with rights (colud someone look at this)

> Hi Davie,

You almost spelled his name correctly.

>
> I did find this in error.log:
>
> [Wed Feb 06 10:55:15 2008] [error] [client 132.229.35.64] Symbolic
> link not
> allo wed
> or link target not accessible: /var/www/shahin/index.php
>
> Any idea?


add FollowSymlinks to the Options directive for your root directory.

(http://httpd.apache.org/docs/2.2/mod...html#directory)

Also ensure the file exists and that it is readable by the apache user.
The file itself, not just the symlink.

Cameron.
  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 21h16.


É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,15753 seconds with 14 queries