Solved

How to make a user like god.

Posted on 2000-02-18
2
206 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
Comment Utility
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
Comment Utility
Thanks for the help!
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

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…
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…
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.

772 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

13 Experts available now in Live!

Get 1:1 Help Now