Solved

How to make a user like god.

Posted on 2000-02-18
2
209 Views
Last Modified: 2013-12-16
OK guys. here's what I've got.  Redhat 6.0 installed on a Pentium box w/ 48mb ram.  

This box has 3 accounts - root, john, and rick.  I have the apache public_html mappings set up for the 2 users, so they each have access to upload their own web content.  I want john to be able to upload content to /home/httpd/html as well.  How can I make it so that john has rights to do this?  I've been using linux for about a year, but I've not done much w/ groups. Please give as much detail as possible.  Thanks!
0
Comment
Question by:kittlej
2 Comments
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 50 total points
ID: 2535202
You hit on exactly the issue when you mentioned groups.

The easiest way likely to be to make John a member of whatever group owns /home/httpd/html and making it group writable.

You can figure out what group owns the directory by doing
  ls -ld /home/httpd/html

You can add John to that group by first finding John's UID in the /etc/passwd file and adding that UID to the list of users in the appropriate group in the /etc/group file.  The passwd entry will look something like this.
  john:<passwd>:123:456:John:/home/john:/usr/bin/bash
The group entry will look something like this:
  thegroup:789:234
And you would then change it to look like this:
  thegroup:789:234,123

The permissions change on the directory is done like this:
  chmod g+rwx /home/httpd/html

You might also want to set the directory so that any files dropped into it are owned by the same group
  chmod g+s /home/httpd/html

Finally, if there's no special group for this (it's owned by something generic like sys, bin, or other), you might want to create one.  This is done similarly to the above in the passwd and group files except that you'd be creating a new entry in the group file rather than updating an existing one.  You'd also have to change the group ownership on the directory with something like:
  chgrp thegroup /home/httpd/html
0
 
LVL 1

Author Comment

by:kittlej
ID: 2554569
Thanks for the help!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

831 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