Solved

Apache Configuration

Posted on 2000-04-17
4
193 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux tcp ports listening for testing 4 63
nagios alerts 3 46
Printing to old printer through Linux (CUPS) Print Server? 7 64
Bash script - Exit out of choice loop 2 30
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

777 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