|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
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? |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
> 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. |
|
![]() |
| Outils de la discussion | |
|
|