Solved

How to make a user like god.

Posted on 2000-02-18
2
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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 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.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

705 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