• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic