Mac-Osx-Server

/usr/sbin/CreateGroupFolder 到底是做什麼的?

  • May 29, 2009

除了在文件系統中創建文件夾並為它們設置正確的權限之外,“ CreateGroupFolder ”是否會做任何事情?

編輯:是的,僅此而已,僅此而已。正如 Chealion 建議的那樣,我使用詳細標誌(doh!)執行它並得到:

sudo CreateGroupFolder -v

Attempting to create group home directory for group 1026 at "/Groups/FooGroup".
Created directory "/Groups/FooGroup/Documents"
Created directory "/Groups/FooGroup/Library"
Created directory "/Groups/FooGroup/Public"
Created directory "/Groups/FooGroup/Public/Drop Box"
Set ownership to user 1000, group 1026: "/Groups/FooGroup" and all sub-directories and files.
Set permissions to rwxr-xr-x (755): "/Groups/FooGroup"
Set permissions to rwxrwxr-x (775): "/Groups/FooGroup/Public"
Set permissions to rwxr-x--- (750): "/Groups/FooGroup/Documents"
Set permissions to rwxr-x--- (750): "/Groups/FooGroup/Library"
Set permissions to rwx-w---- (730): "/Groups/FooGroup/Public/Drop Box"

Successfully created group home directory for group 1026 at "/Groups/FooGroup".

CreateGroupFolder(1) BSD 通用命令手冊 CreateGroupFolder(1)

NAME CreateGroupFolder – 創建和填充組目錄。

概要 創建組文件夾

$$ -q $$ $$ -v $$ $$ -f $$ 描述 提供了幾個用於創建和填充組目錄的選項。

A list of flags and their descriptions:

-q       Sets Quiet mode - suppress ouput to console Creates a set of default folders for use by groups
         on the local server with little console messages

-v       Sets Verbose mode - More ouput to console Creates group directories for groups defined in the
         local server with more console messages

-f       Force all missing folders to be re-created.  Creates group directories for groups defined in a
         specific server even if they already exist All permissions and ownerships to be returned to
         defaults This option will also change the ownership and permissions on all files within the
         each group's folder hierarchy.  Use this option with care

文件 /usr/sbin/CreateGroupFolder 工具的位置

引用自:https://serverfault.com/questions/9265