忍者ブログ

醤油みたいな使いかっての良いブログにしたい
04 2024/05 1 2 3 45 6 7 8 9 10 1112 13 14 15 16 17 1819 20 21 22 23 24 2526 27 28 29 30 31 06

05.02.16:49

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

  • 05/02/16:49

06.22.01:49

マップされていないユーザーのUNIXアクセスを許可する

Windows Server 2008 の NFS はユーザー名マッピングをしないとアクセスできないけど、Windows Server 2008 R2 からはユーザー名マッピングをしなくてもアクセスできるようになりました。

 ※2012/06/25追記:R2なしの2008でもユーザー名マッピングしなくてもアクセスできるようでした。

Windows Server 2008 のNFS共有タブの設定




Windows Server 2008 R2のNFS共有タブの設定




「マップされていないユーザーのUNIXアクセスを許可する」というチェックボックスがありますね。ここにチェックを入れるのがポイント。

マウントします。
---------------------------
[root@CentTest ~]# mount -t nfs 192.168.1.108:/W2K8 /W2K8
[root@CentTest ~]# mount -t nfs 192.168.1.208:/W2K8R2 /W2K8R2
---------------------------

権限を確認します。
---------------------------
[root@CentTest ~]# ls -al /
drwx------ 2 4294967294 4294967294 64 6月 22 00:59 W2K8
drwx------ 2 4294967294 4294967294 64 6月 22 01:06 W2K8R2
---------------------------

root でファイルを作成します。
Windows Server 2008 はファイルが作成できませんが、R2は作成できます。
---------------------------
[root@CentTest ~]# touch /W2K8/root01
touch: cannot touch `/W2K8/root01': 許可がありません

[root@CentTest ~]# touch /W2K8R2/root01
[root@CentTest ~]#
---------------------------

一般ユーザーでファイルを作成します。
どちらも権限がないのでファイルが作成できません。
---------------------------
[sample@CentTest ~]$ touch /W2K8/user01
touch: cannot touch `/W2K8/user01': 許可がありません

[sample@CentTest ~]$ touch /W2K8R2/user01
touch: cannot touch `/W2K8R2/user01': 許可がありません
---------------------------

rootで権限を変更します。
Windows Server 2008 の方はやはり変更できません。
---------------------------
[root@CentTest ~]# chmod 777 /W2K8
chmod: changing permissions of `/W2K8': 許可されていない操作です

[root@CentTest ~]# chmod 777 /W2K8R2
[root@CentTest ~]#

[root@CentTest ~]# ls -al /
drwx------ 2 4294967294 4294967294 64 6月 22 00:59 W2K8
drwxrwxrwx 2 4294967294 4294967294 64 6月 22 01:06 W2K8R2
---------------------------

再度一般ユーザーでファイルを作成します。
R2 は権限が与えられた(その他のユーザーに rwx)のでファイルの作成ができます。
---------------------------
[sample@CentTest ~]$ touch /W2K8/user01
touch: cannot touch `/W2K8/user01': 許可がありません

[sample@CentTest ~]$ touch /W2K8R2/user01
[sample@CentTest ~]$

[sample@CentTest ~]$ ls -al /W2K8R2/
-rw-rw-r-- 1 sample sample 0 6月 22 01:36 user01
---------------------------


Windows Server 2008 のNFS共有フォルダで、Windows 上の everyone ユーザーにフルコントロールを与えてみると、777 の権限になります。
---------------------------
[root@CentTest ~]# ls -al /
drwxrwxrwx 2 4294967294 4294967294 64 6月 22 00:59 W2K8
---------------------------

それでも root, 一般ユーザーともにファイルの作成はできません。
---------------------------
[root@CentTest ~]# touch /W2K8/root
touch: cannot touch `/W2K8/root': 許可がありません

[sample@CentTest ~]$ touch /W2K8/user03
touch: cannot touch `/W2K8/user03': 許可がありません
---------------------------

以上、Windows Server 2008 の NFS はユーザー名マッピングをしないとアクセスできないけど、R2 からはアクセスできるよという話でした。

【参考】
NFS 用サービスの概要
NFS クライアントによるリソースへのルート アクセスと匿名アクセスを許可する


PR
URL
FONT COLOR
COMMENT
Vodafone絵文字 i-mode絵文字 Ezweb絵文字
PASS

TRACK BACK

トラックバックURLはこちら