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
Solved

How to make a user like god.

Posted on 2000-02-18
2
211 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

839 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