[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to make a user like god.

Posted on 2000-02-18
2
Medium Priority
?
217 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 150 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

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month18 days, 3 hours left to enroll

830 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