10-17-2005, 08:48 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
I assume you mean grouped by group rather than owned by group.
This is the purpose of the sgid bit. You group the directory to the group you want then add the sgid bit by prepending the permissions with a 2. For example if you want the directory to be rwxr-x-r-x (755) you would type "chmod 2755 dirname". The permissions would then show as "rwxr-s-r-x" The "s" where the "x" should have been lets you know the sgid bit is on. After that files created in the directory will have the same group as the directory itself.
|
|
|