Solved

Apache Configuration

Posted on 2000-04-17
4
191 Views
Last Modified: 2010-04-20
  I've installed Redhat 6.0 on a networked pc.  Samba works fine.  Apache gives me the 'IT WORKED' screen when I hit my site from a workstation web browser (IE5). Ping & telnet works also.
  I cannot, however, make changes to the index file or save anything in the httpd directory. I've gone to the smb.conf file and added 'valid users = {myself}' under {www] share definitions.  I've also given {myself} -privileges -services 'Apache Administration' granted under linuxconf, .  These tabs seem to have no effect.
   The only way I can make changes to index.html is to be logged in at the server console as root and edit with the native netscape browser.
   I'm pretty sure I've got a permissions issue. How do I grant myself editing priviledges? Any help here appreciated!

Thanks - Keith
0
Comment
Question by:stewartkc
4 Comments
 
LVL 1

Expert Comment

by:andrewljohn70
ID: 2726078
Hi Kieth,
the files in the http directory all belong to the root.
So if you log in as say 'kieth' you will only be able to view the contents in an editor and not be able to edit and save the file.

To be able to give rights to kieth.
1. log in as root
2. move to the http directory
3. chown -c kieth index.html - this will change the owner of the file index.html to kieth and also show you a comment.

Hope this is what you are looking for.
Happy Apatching!  :)
0
 

Expert Comment

by:castleinfo
ID: 2726087
I'm a little confused.. How else would you edit apart from opening the file ?

Apache security is for people accessing through the web, not for file access.
File access is controled by standard group (nobody) user(nobody) other(none) access.

If you do a chmod 777 filename
this will give everyone access to the file concerned.

Your best bet is to set up Samba then you can access the files over the network.

0
 

Accepted Solution

by:
skyValley earned 100 total points
ID: 2728524
Hello Keith,

Let's try to clarify a few things.

First, check the file permissions for index.html. Assuming it is located in \home\httpd\html issue the command:
ls -l /home/httpd/html/index.html

Look at the file permissions and the owner and group. The file permissions (in case you do not know this) are read, write and execute (r, w and x respectively) and listed for the user, group and others. For example the output of this command on my system is:
-rw-r--r-- 1 root    root    174 Feb 11 08:52 /home/httpd/html/index.html

Which means that root has read and write access but everyone else just has read access. In addition root is the owner and the root group is the group of which it's members can access this file.

You can change file rights with the chmod command. See your man pages for information or someplace like unixhelp (http://unixhelp.ed.ac.uk/ to look at file permissions. As someone else previously mentioned, you can use chmod 777 to grant all access (read, write and execute) to user, group and others.

You can change the owner or the group using the chown or chgrp commands respectively.

You can see what group your current user is a member of with the id command.

Good Luck,
Scott
0
 

Author Comment

by:stewartkc
ID: 2732907
Sky, Thanks for the help. You, at the very least, put me on a path.  Coming from a netware environment makes the crossover a little harder, but some of the concepts are the same.  You don't have to reply, but here's what I did:

Linuxconfig - Group definitions, created 'WEB' group.  Alternate members 'KCS' 'CLS'

Ctrl Alt f1 to prompt-login as root

CD'd to the \html directory

CHOWN :web*
CHMOD g+rwx *

That's all.  Thanks for the pointer to unixhelp.  I've booked it.

If you've got a different method or comments on the above, email me at stewartkc@aol.com.  You get the points!

Tnks again.

Keith
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now