|
发表于 2003-1-11 09:51:18
|
显示全部楼层
groupadd comgrp1
groupadd comgrp2
useradd -g comgrp1 -G comgrp2 usr1
useradd -g comgrp2 -G comgrp1 usr2
mkdir /usr/local/comshare
chown usr1.comgrp1 /usr/local/comshare
chmod 770 /usr/local/comshare
mkdir /usr/local/comshare/usr1
chown -R usr1.comgrp1 /usr/local/comshare/usr1
chmod -R 750 /usr/local/comshare/usr1
mkdir /usr/local/comshare/usr2
chown -R usr2.comgrp2 /usr/local/comshare/usr2
chmod -R 750 /usr/local/comshare/usr2
* part of [smb.conf] file
[grpshare]
comment = group share
path = /usr/local/comshare
browseable =yes
writable = yes
valid user = @comgrp1
create mode = 0750
create mode = 0750
-----------------------------------------------------
usr1 has full access and usr2 has read-only access to /usr/local/comshare/usr1
usr2 has full access and usr1 has read-only access to /usr/local/comshare/usr2
不知道这段代码有没有帮助? |
|