LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-23-2006, 02:35 PM   #1
parsex
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Rep: Reputation: 0
Hi. Apache not working under normal user.


Hi.
Newbee on board.
I installed suse desktop 10.1.
Apache is running but when i try to test apache under user it returns: object not found.
Testing as localhost it works!
localhost (works)
localhost/me/index.html (object not found)


Any suggestions?
 
Old 07-24-2006, 03:01 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
Moderator note: I have moved this thread from Member Intro to Newbie, because you ask a technical question.

I understand you can get the Apache welcome page. Now, what is your Apache root dir and where's the directory you want access to relative to the root dir? Without extra configration you can't access directories outside Apache root dir. Example (default config in most systems): Apache root dir is /var/www/html. It means that if you want to access /var/www/html/mydir/somefile.html, you point your browser to http://localhost/mydir/somefile.html. With such config you can't access /home/myname/anotherfile.html
 
Old 07-24-2006, 03:55 PM   #3
parsex
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mara
Moderator note: I have moved this thread from Member Intro to Newbie, because you ask a technical question.

I understand you can get the Apache welcome page. Now, what is your Apache root dir and where's the directory you want access to relative to the root dir? Without extra configration you can't access directories outside Apache root dir. Example (default config in most systems): Apache root dir is /var/www/html. It means that if you want to access /var/www/html/mydir/somefile.html, you point your browser to //localhost/mydir/somefile.html. With such config you can't access /home/myname/anotherfile.html
As i said i have installed suse linux 10.1 desktop edition.
The problem lied elsewhere.

As i mentioned /localhost/ was ok. it returned the "it works" page from apache.
I found the solution.
A friend told me to use the ~ before my folder... so i tryed this: /localhost/~myacount/index.php and it worked fine!
I don't know why ~ (tilda) is necessary, i forgot to ask my friend :P
But anyway thx for your suggestion Mara.

Parsex
 
Old 07-25-2006, 03:05 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
~ moves (in this case) to your home dir. So that's more of less what I was writing about. But, if you have such config, be very careful when creating new users etc, because they can access their scripts/files the same way (if you're the only users, that's probably ok).
 
Old 07-26-2006, 04:36 AM   #5
parsex
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mara
~ moves (in this case) to your home dir. So that's more of less what I was writing about. But, if you have such config, be very careful when creating new users etc, because they can access their scripts/files the same way (if you're the only users, that's probably ok).
Ok Mara.
I understand now.
I will check where apache resides when i'm@home.
So what do suggest me to do, so that i can call apache directly as user and not calling a redirect link?

Thx in advance.
 
Old 07-26-2006, 04:01 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
You can set up a different Apache share, let's say in /var/www2. If you set the permissions in such a way that you and the apache user can work with the files, it will be fine. You can copy your files inside, but they stay in a safe place. I can provide an short example of such configration if you wish.
 
Old 07-27-2006, 02:48 AM   #7
parsex
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mara
You can set up a different Apache share, let's say in /var/www2. If you set the permissions in such a way that you and the apache user can work with the files, it will be fine. You can copy your files inside, but they stay in a safe place. I can provide an short example of such configration if you wish.

I will owe u one if you do that Mara
 
Old 07-27-2006, 07:04 AM   #8
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Rep: Reputation: 15
hello ,
i beleive that httpd runs on port 80 which is reserved for only the super user
normal users are prevented form accessing this httpd daemon
 
Old 07-27-2006, 03:06 PM   #9
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
Something like this should do (added to Apache config file):
Code:
<Directory /var/www2/public_html>
    AllowOverride All
    Options MultiViews Indexes
</Directory>
/var/www2/public_html is the real dir. Create it as root, change owner to your user. Then create a group with your user and apache user (www-data or apache, should be in the config file or just look into the system settings, it should be obvious) and change group of /var/www2/public_html to that group.
Give read/write permissions as needed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X no longer working as normal user - permission denied vharishankar Debian 4 07-15-2006 12:36 AM
iRiver drivers working for normal user ? smau Linux - Hardware 1 10-24-2005 04:15 PM
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM
Letting normal user change apache directory nivek7 Linux - General 9 05-04-2004 06:58 PM


All times are GMT -5. The time now is 10:48 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration