Sponsored Content
Top Forums UNIX for Dummies Questions & Answers new directory - how to force files created in it to inherit grp,own and permissions Post 20469 by avisb on Friday 26th of April 2002 03:04:44 PM
Old 04-26-2002
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.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find all files created by a specified user in a directory and its subdirectories

Is there a command or shell script which can be used for Finding all files created by a specified userid in a directory and its subdirectories. Say, I want to find all such files in directory /abc as well as in all the subdirectories such as /abc/xyz or /abc/xyz/pqr aqnd so on which was created... (5 Replies)
Discussion started by: abhilashnair
5 Replies

2. UNIX for Dummies Questions & Answers

Newly created files default group and write permissions

Whenever I create a new file the group name is "dnn" and the file permissions are "-rw-r--r--". How do I get it so when I create files (with vi or other programs) that the default group is "sss" and the permissions are 770? (I am running HP-UNIX) Thanks, GoldFish (2 Replies)
Discussion started by: goldfish
2 Replies

3. UNIX for Advanced & Expert Users

files created with different permissions

Hi, Within a SQL file i am calling 5 shell scripts in back ground and redirecting their outputs to different log files in a specific directory. Now when I observed is, the log files are created with different permissions even though i did not do any thing specific. For example in... (2 Replies)
Discussion started by: steria_learner
2 Replies

4. Shell Programming and Scripting

How to find files created today in a particular directory?

Dear All, I want a Hp Ux command to find out the files created today in a particular directory or mountpoint. Kindly help. Thanks Bhaskar (10 Replies)
Discussion started by: sudiptabhaskar
10 Replies

5. UNIX for Advanced & Expert Users

Solaris files created within directory in last 15min.

I have a directory on a Solaris box that has 58 files written to it every 15min. They have a non standard date as part of the file name but always have another name with it. I need to check that directory for files created within the last 15min and then port the results to a log file. There are... (5 Replies)
Discussion started by: jlaigo2
5 Replies

6. Red Hat

Set permissions for new files created by application

Hello All, I have an application that creates the log files and they created with 600 permissions instead of 644(default). How can I set the permissions so that files can be created with 644. I looked into the /etc/profile for the umask settings and it is set 002(if UID>199). And when I type... (5 Replies)
Discussion started by: s_linux
5 Replies

7. UNIX for Dummies Questions & Answers

How to find directory listing from root to all files in tree format with details of perm/own/grp?

Hi, My apologies if my query is already available on this forum but I am new and could not find. I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this? ... (4 Replies)
Discussion started by: 8709711
4 Replies

8. Shell Programming and Scripting

List files with date, create directory, move to the created directory

Hi all, i have a folder, with tons of files containing as following, on /my/folder/jobs/ some_name_2016-01-17-22-38-58_some name_0_0.zip.done some_name_2016-01-17-22-40-30_some name_0_0.zip.done some_name_2016-01-17-22-48-50_some name_0_0.zip.done and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies

9. UNIX for Beginners Questions & Answers

Asking about the permission inherit from the parent directory

Asking about the permission inherit from the parent directory I am running the web app with tomcat8, I did use umask 007 to set permission for folder which enable the sub files and folder inherit the permission from the parent directory, I was successful which some directories but the directories... (1 Reply)
Discussion started by: janecaongoc
1 Replies

10. UNIX for Beginners Questions & Answers

Asking about the permission inherit from the parent directory

Asking about the permission inherit from the parent directory I am running the web app with tomcat8, I did use umask 007 to set permission for folder which enable the sub files and folder inherit the permission from the parent directory, I was successful which some directories but the directories... (2 Replies)
Discussion started by: janecaongoc
2 Replies
DPNS-SETACL(1)							DPNS User Commands						    DPNS-SETACL(1)

NAME
dpns-setacl - set DPNS directory/file access control lists SYNOPSIS
dpns-setacl [-d] [-m] [-s] acl_entries path... DESCRIPTION
dpns-setacl sets the Access Control List associated with a DPNS directory/file. acl_entries is a comma separated list of entries. Each entry has colon separated fields: ACL type, id (uid or gid), permission. Only direc- tories can have default ACL entries. The entries look like: user::perm user:uid:perm group::perm group:gid:perm mask:perm other:perm default:user::perm default:user:uid:perm default:group::perm default:group:gid:perm default:mask:perm default:other:perm The ACL type can be abbreviated to the first letter. The first "user" entry gives the permissions granted to the owner of the file. The following "user" entries show the permissions granted to specific users, they are sorted in ascending order of uid. The first "group" entry gives the permissions granted to the group owner of the file. The following "group" entries show the permissions granted to specific groups, they are sorted in ascending order of gid. The "mask" entry is the maximum permission granted to specific users or groups. It does not affect the "owner" and "other" permissions. The "mask" entry must be present if there are specific "user" or "group" entries. "default" entries associated with a directory are inherited as access ACL by the files or sub-directories created in that directory. The umask is not used. Sub-directories also inherit the default ACL as default ACL. As soon as there is one default ACL entry, the 3 default ACL base entries (default user, default group, default other) must be present. The entry processing conforms to the Posix 1003.1e draft standard 17. The effective user ID of the process must match the owner of the file or the caller must have ADMIN privilege in the Cupv database. path specifies the DPNS pathname. If path does not start with /, it is prefixed by the content of the DPNS_HOME environment variable. uid can be given as the username or the corresponding numeric id. gid can be given as the groupname or the corresponding numeric id. perm can be expressed as a combination of characters rwx- or as a value between 0 and 7. OPTIONS
-d remove ACL entries. The "perm" field is ignored. -m modify existing ACL entries or add new entries. -s set the ACL entries. The complete set of ACL entries is replaced. EXAMPLES
Let's create a directory: dpns-mkdir /dpm/dteam/test/file.log/d6 and add write permission for user bcouturi: dpns-setacl -m u:bcouturi:rwx,m:rwx /dpm/dteam/test/file.log/d6 Let's create a directory: dpns-mkdir /dpm/dteam/test/file.log/d7 and add default ACLs to it: dpns-setacl -m d:u::7,d:g::7,d:o:5 /dpm/dteam/test/file.log/d7 Let's check the resulting ACLs: dpns-getacl /dpm/dteam/test/file.log/d7 # file: /dpm/dteam/test/file.log/d7 # owner: baud # group: c3 user::rwx group::r-x #effective:r-x other::r-x default:user::rwx default:group::rwx default:other::r-x Let's create a sub-directory and check the resulting ACLs: dpns-mkdir /dpm/dteam/test/file.log/d7/d2 dpns-getacl /dpm/dteam/test/file.log/d7/d2 # file: /dpm/dteam/test/file.log/d7/d2 # owner: baud # group: c3 user::rwx group::rwx #effective:rwx other::r-x default:user::rwx default:group::rwx default:other::r-x Let's create a file in the same directory and check the resulting ACLs: dpns-touch /dpm/dteam/test/file.log/d7/f2 dpns-getacl /dpm/dteam/test/file.log/d7/f2 # file: /dpm/dteam/test/file.log/d7/f2 # owner: baud # group: c3 user::rw- group::rw- #effective:rw- other::r-- EXIT STATUS
This program returns 0 if the operation was successful or >0 if the operation failed. SEE ALSO
Castor_limits(4), dpns_chmod(3), dpns_chown(3), Cupvlist(1) AUTHOR
LCG Grid Deployment Team DPNS
$Date: 2003/08/26 06:21:13 $ DPNS-SETACL(1)
All times are GMT -4. The time now is 11:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy