Samba 共有を読み書きでマウントできない

Samba 共有を読み書きでマウントできない

msc001y システムに Samba をインストールしました。 msc001の共有フォルダにアクセスしたいです。

どちらのシステムも同じユーザーを持っています(Sambaでミラーリングされています)。

msc (5001), james (5002), rachel (5003).

どちらのシステムも同じグループを持ちます。

grp_public (2001), grp_personal (2002)

msc、誰もがアクセスでき、jamesアクセスできます。rachelgrp_publicjamesrachelgrp_personal

私は次のことをしました。

chgrp -R grp_public /mnt/local/int001/media/public/
chgrp -R grp_personal /mnt/local/int001/media/personal/

chmod 2775 /mnt/local/int001/media/public/
chmod 2770 /mnt/local/int001/media/personal/

msc001yのsmb.confに追加されました:

[グローバル]内から

# Inherit ownership of the parent directory for new files and directories
inherit owner = unix only
# Inherit permissions of the parent directory for new files and directories
inherit permissions = yes

create mask = 0775
directory mask = 2775
force create mode = 0775
force directory mode = 2775

それから

[public]

comment = Public Stuff
path = /mnt/local/int001/media/public
public = yes
writable = no
printable = no
write list = @grp_public, msc, james, rachel
inherit acls = yes

[パブリック]マウントする前に、マウントポイントが次のようにリストされます(たとえば、所有者とグループの場合はRWX)。

drwxrwxr-x 2 msc grp_public    0 Jul 25 23:07 public

インストールしたら、次のようになります(たとえば、所有者の場合はRWX、グループの場合はRXなしW)。

drwxr-xr-x 2 msc grp_public    0 Jul 25 23:07 public

次のようにインストールされます。

//msc001y/public /mnt/remote/msc001y/public cifs user,nofail,_netdev,vers=3.1.1,uid=msc,gid=grp_public,credentials=/mnt/local/data/.Credentials/james.cred 0 0

ログインするとmsc所有者なので読み書きができますが、JamesやRachelなら読取り専用状態に閉じ込められています。

以前にRWXだったフォルダがマウント後にデフォルトでRXに設定されているのはなぜですか?

注:共有フォルダ内のすべてのファイルはRWX | RWX | R_Xです。

ベストアンサー1

あなたはグループに@grp_public, @msc, @james, @rachel属していwrite listますが、ユーザーです。grp_publicmscjamesrachel

正しい書き込みリストは次のとおりです。

write list = msc, james, rachel, @grp_public

また見てくださいman 5 smb.conf

write list (S) サービスへの読み取りおよび書き込みアクセス権が付与されたユーザーのリスト。接続しているユーザーがこのリストにある場合、読み取り専用オプションの設定に関係なく書き込みアクセス権が付与されます。リストには @group 構文を使用してグループ名を含めることができます。ユーザーが読み取りリストと書き込みリストの両方にある場合、書き込みアクセス権が付与されます。

Default: write list =

Example: write list = admin, root, @staff

おすすめ記事