![/usr/sbin/CreateGroupFolder 到底起什么作用?](https://linux22.com/image/482405/%2Fusr%2Fsbin%2FCreateGroupFolder%20%E5%88%B0%E5%BA%95%E8%B5%B7%E4%BB%80%E4%B9%88%E4%BD%9C%E7%94%A8%EF%BC%9F.png)
做 ”创建组文件夹“除了在文件系统中创建文件夹并为其设置正确的权限之外还能做什么?
编辑:是的,不多不少。按照 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".
答案1
CreateGroupFolder(1) BSD 常规命令手册 CreateGroupFolder(1)
名称 CreateGroupFolder——创建并填充组目录。
摘要 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 工具的位置