Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


Preserve linux group on directory

$ chgrp Groupname DirectoryName      # Change group of folder
$ chmod g+s DirectoryName            # Set group id of folder - this will preserve group of created files
$ echo umask 0002 >> ~/.bashrc       # Set default mask of created files (every user needs to do this one)
# After next login, check umask
$ umask                              # Display umask
$ umask -S                           # display current value symbolically


Enter your comment:
Y P N​ K C
linux/misc/preserve_group_in_folder.txt · Last modified: 2019/10/31 09:05 (external edit)