Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> /etc/profile <- Editing
Termina
post Apr 5 2004, 10:40 PM
Post #1


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



Does anyone know how to have all newly created files be owned by a certain group?


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
Hemant
post Apr 6 2004, 05:54 AM
Post #2


RMS is my Hero
******

Group: Support Specialist
Posts: 782
Joined: 6-October 02
From: Trichy,INDIA
Member No.: 29



it depends who creates..the file..
If you add all the users..to a particular group..then all the files..created..by those..user will automatically belong to that group..


--------------------
Hemant Kumar
user posted image
hemant@linuxhelp.net
Go to the top of the page
 
+Quote Post
Termina
post Apr 6 2004, 12:51 PM
Post #3


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



That's the problem. =/

I do NOT want the users to be of that group, but I want any files they create to be of that group.

All users belong to no group (or perhaps the "users" group), but I need their home directories to be viewable by apache (ie, group "nobody").

All their files/folders have a permission of 750


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
Hemant
post Apr 6 2004, 10:27 PM
Post #4


RMS is my Hero
******

Group: Support Specialist
Posts: 782
Joined: 6-October 02
From: Trichy,INDIA
Member No.: 29



If you want group apache to have read permissions of /home/<user_name> directory..so that each user can have website on his own..then this is not the way to go..
Checkout file.../etc/httpd/httpd.conf
and you will find that each user can create a directory public_html
inside his home directory..and this directory can work as document root for apache..

If your problem was specific to apache..
What you have to do is allow..public_html as document root for each user.By default is disabled.


--------------------
Hemant Kumar
user posted image
hemant@linuxhelp.net
Go to the top of the page
 
+Quote Post
Termina
post Apr 6 2004, 11:14 PM
Post #5


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



No, it's working fine, and httpd.conf is fine.

The problem is with permissions.

I do not want other members looking at other members files (thus the 750 permission), and yet I want the public to view it from the web (thus the "nobody" group).

Every member does have a ~/public_html directory by default (/etc/skel) happy.gif


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
chrisw
post Apr 7 2004, 08:37 AM
Post #6


RMS is my Hero
******

Group: Admin
Posts: 634
Joined: 27-September 02
From: Louisiana
Member No.: 5



the only way i see this working is for each user to be in their
own group by username


--------------------

Chris W.
Go to the top of the page
 
+Quote Post
Termina
post Apr 7 2004, 12:46 PM
Post #7


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



I guess that could work. O_o

Is there a way to add a user to multiple groups? (with usermod, maybe?)

You see, I have an automatic signup script (php), and I want everything to be automated. biggrin.gif


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
chrisw
post Apr 7 2004, 01:02 PM
Post #8


RMS is my Hero
******

Group: Admin
Posts: 634
Joined: 27-September 02
From: Louisiana
Member No.: 5



ya you can assign users to multiple groups
the command is
usermod -G groupname,groupname,etc.. username


--------------------

Chris W.
Go to the top of the page
 
+Quote Post
Termina
post Apr 7 2004, 01:21 PM
Post #9


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



Do I have to do that each time? Or can I just do "usermod -G newgroup user" and keep all the old groups that user was a part of?

Thanks for your help thus far. smile.gif


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
chrisw
post Apr 7 2004, 02:08 PM
Post #10


RMS is my Hero
******

Group: Admin
Posts: 634
Joined: 27-September 02
From: Louisiana
Member No.: 5



you should be able to just add each group seperatly but at times
i have had trouble with let say using the following

my username: chrisw is part of group chrisw also by default.

if i want to add my username to group nobody i would just use the following
usermod -G nobody chrisw
and it will add me to the nobody group

but this is where sometimes i have trouble...
if i want to later on add myself to the group operator, i would do the the same
as i did before...but then sometimes i would run into trouble being
that when i would add myself to the group operator, it would delete me from
the group nobody and add me to the group operator, which in a since would be
troublesome especially if i was part of alot of groups...

or sometimes it would work properly ..leaving me in the group nobody and also
adding me to the group operator...

you will just have to experiment with a user to find out exactly what happens...
i wish i could give you a definite answer but i have had both situations happen
to me in the past...so what i usually do is just to be safe..add me back to
all existing groups plus the one i want to be added to...that way i dont
run into trouble and get bumped from a group.


--------------------

Chris W.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 15th December 2017 - 02:38 PM