The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Get the latest directory created f354676 Shell Programming and Scripting 2 05-12-2008 02:59 PM
Newly created files default group and write permissions goldfish UNIX for Dummies Questions & Answers 2 02-20-2008 06:39 PM
Find all files created by a specified user in a directory and its subdirectories abhilashnair UNIX for Dummies Questions & Answers 5 06-13-2007 02:37 AM
permissions of a directory smehra UNIX for Dummies Questions & Answers 3 06-04-2006 10:32 AM
determine owner directory permissions from within the directory Sniper Pixie Shell Programming and Scripting 4 03-07-2006 05:06 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-26-2002
avisb avisb is offline
Registered User
  
 

Join Date: Dec 2001
Posts: 1
new directory - how to force files created in it to inherit grp,own and permissions

Hi, I'm new to unix -solaris.

I've just upgraded a third party software product and am testing
it to see if new files created in a test database directory were being created properly and they aren't. They're owned by the user that created the file, instead of poppa and the group of their files is not always momma - see below..

I created a directory and set owner, group and permissions on it as follows :

mkdir /tempdb
chown poppa tempdb
chgrp momma tempdb
chmod 660 tempdb

My question is - how do I force files created in this directory to inherit the owner and group and permissions of the directory itself ?

All users with access to log in to this sun box will need to share these files.

Thanks in advance if anyone can help me.
Is it umask I need or setacl ?
I've read the umask man page but it's a bit confusing.
  #2 (permalink)  
Old 04-26-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
/etc/group and umask

__________________________
An easy way to solve this is to add the users who will share these files to the group that it application user is a member of.

If the default group is oracle, then make all the users a member of the group oracle in /etc/group...

IF you want everyone to have permissions in the poppa dir, give them a secondary group of momma in /etc/group.
Also, make sure the group rights are such that users can read/write files in the specified dir.

___________________________
Umask can be modified in the .profile of the specified user. It i will give the opposite of what you set the umask to for new files and dirs created by that user...

If you set "umask 022" then the new file parms will be 644. Note that you cannot give executable permissions with umask. It will not do it even if you give umask 000...

Set umask 006, this will give you 660 for new file creation.
  #3 (permalink)  
Old 04-26-2002
hugo_perez hugo_perez is offline
Registered User
  
 

Join Date: Apr 2002
Location: Argentine - that better than to eat meat and to drink wine (both Argentineans)?.
Posts: 132
The owner forget it, because is necesary to create an executable, or an script and can cause an exposure.

For the group

chmod g+s /tempdb

The user that create a file in /tempdb must be in the momma group.

Regards. Hugo
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0