Solved

Apache Configuration

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

920 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

15 Experts available now in Live!

Get 1:1 Help Now