LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-10-2009, 04:53 AM   #1
abhijit_mohanta
LQ Newbie
 
Registered: Apr 2008
Posts: 27

Rep: Reputation: 15
inherit permissions of the parent directory in newly created file


I have created a directory and added to to a group.I want that any new files/dirs created in the directory should inherit all the permissions including user and owner.

chgrp -Rv mygrp mydir/
I have used the above command to add mydir directory to mygrp group.
I want any new files created in mydir shoul have group owner as mygrp and inherit other permissions of mydir also.I think umask,sgid command should solve the purpose but can anybody suggest me ho to do it

Last edited by abhijit_mohanta; 09-10-2009 at 04:56 AM.
 
Old 09-10-2009, 07:45 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
For default group ownership

chmod g+s dirname
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically inherit parent folder permissions when copying files teixeira Linux - Newbie 3 07-08-2008 01:21 PM
Samba - Inherit Permissions from Parent Directory bence8810 Linux - Software 6 08-03-2006 07:33 AM
Newly created File/directory permissions? redrobin77 Fedora 3 11-14-2005 05:55 AM
How to set permissions for newly created dirs? z-vet Linux - General 2 12-04-2004 09:06 AM
permissions for newly created files dialbat Linux - General 2 10-04-2004 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration