This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes UNIXhow to ensure files created in a directory automatically has group Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "UNIXhow to ensure files created in a directory automatically has group "w" permission" Watch "UNIXhow to ensure files created in a directory automatically has group "w" permission" New topic
Author

UNIXhow to ensure files created in a directory automatically has group "w" permission

Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
I have current directory permission setting

drwxrwxr-x abc abc mydir

if I "cd mydir", and create a new file "myfile", I saw following permission setting for "myfile"

-rw-r--r-- abc abc myfile

How can I make it be like

-rw-rw-r-- abc abc myfile

??

Note: I am referring to any new file, not existing files. For existing files, I know I can simple do "chmod g+w *" inside the directory. thanks for help in advance !
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

I don't know how to change this for every file created in a directory, but you may use

- at least my linux behaves this way.
was my only information source.


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UNIXhow to ensure files created in a directory automatically has group "w" permission