ユーザーがディレクトリ グループに属している場合、サブディレクトリを作成する権限がありません

ユーザーがディレクトリ グループに属している場合、サブディレクトリを作成する権限がありません

ディレクトリ DirA (ディレクトリの所有者はroot、グループはsys) があるとします。
ユーザー userA があり、ユーザーはグループ sys に属しているため、DirA 内にサブディレクトリを作成できるはずです。

Solaris SunOS 5.9 には次のディレクトリがあります/opt:

bash-2.05$ ls -la /
total 1205
drwxr-xr-x  34 root     root        1024 Mar 17 04:21 .
drwxr-xr-x  34 root     root        1024 Mar 17 04:21 ..
.. Removed all..
lrwxrwxrwx   1 root     other         16 Apr 14  2008 opt -> /export/home/opt

このシンボリック リンクは次の場所に移動します。

bash-2.05$ ls -la /export/home
total 524638
drwxr-xr-x  31 root     root        1024 Jan 25  2015 .
drwxr-xr-x   3 root     sys          512 Jul  2  2007 ..
...REMOVED...
drwxr-xr-x  12 root     sys          512 Apr 24 10:29 opt

私はユーザーbuilderでログインしています:

bash-2.05$ /usr/ucb/whoami
builder

彼は以下のグループに属しています:

bash-2.05$ groups builder
other root sys 
bash-2.05$

では、なぜmkdir失敗するのでしょうか/opt/?

bash-2.05$ cd /opt/
bash-2.05$ pwd
/opt
bash-2.05$ mkdir mynewdir
mkdir: Failed to make directory "mynewdir"; Permission denied
bash-2.05$ cd /export/home/opt/
bash-2.05$ mkdir mynewdir
mkdir: Failed to make directory "mynewdir"; Permission denied
bash-2.05$

答え1

drwxr-xr-x  12 root     sys          512 Apr 24 10:29 opt

は、ディレクトリが のみ書き込み可能であることを意味しますrootsysグループメンバーがディレクトリに変更を加える(サブディレクトリの作成を含む)ためには、

drwxrwxr-x  12 root     sys          512 Apr 24 10:29 opt

これを有効にするには:

chmod g+w opt

適切な変更を行います。

関連情報