Samba共有からフォルダを削除できません

Samba共有からフォルダを削除できません

非常に奇妙な問題に対処していますが、原因がわかりません。 autofsとflagsを使用してRocky 9.2にSamba共有をマウントしました-fstype=cifs,rw,nounix,file_mode=0700,dir_mode=0700,multiuser,sec=krb5,user=username,cruid=username,gid=primarygroup,_netdev

うまくインストールされ、ファイルを追加して削除することもできますが、コンテンツを削除しようとすると、フォルダは非常に奇妙に動作します。たとえば、次のようになります。

$ mkdir dir
$ mkdir dir/{a,b}
$ touch dir/{a,b}/f{1..5}
$ tree dir
dir
├── a
│   ├── f1
│   ├── f2
│   ├── f3
│   ├── f4
│   └── f5
└── b
    ├── f1
    ├── f2
    ├── f3
    ├── f4
    └── f5

2 directories, 10 files
$ rm --recursive --force --verbose dir
removed 'dir/b/f2'
removed 'dir/b/f4'
removed 'dir/b/f5'
removed 'dir/b/f1'
removed 'dir/b/f3'
removed directory 'dir/b'
removed 'dir/a/f2'
removed 'dir/a/f4'
removed 'dir/a/f5'
removed 'dir/a/f1'
removed 'dir/a/f3'
removed directory 'dir/a'
rm: cannot remove 'dir': Directory not empty
$ tree dir
dir
├── a
└── b

2 directories, 0 files
$ rm --recursive --force --verbose dir
rm: cannot remove 'dir': Directory not empty
$ ls --all --recursive dir # in the output note the lack of . and .. in dir/a and dir/b
dir:
.  ..  a  b

dir/a:

dir/b:
$ rmdir dir/a
rmdir: failed to remove 'dir/a': No such file or directory
$ rmdir dir/b
rmdir: failed to remove 'dir/b': No such file or directory
$ tree dir
dir
├── a
└── b

2 directories, 0 files
$ ls --all --recursive -l dir
dir:
total 0
drwx------. 2 username primarygroup 0 Jun  9 16:23 .
drwx------. 2 username primarygroup 0 Jun  9 16:23 ..
drwx------. 2 username primarygroup 0 Jun  9 16:23 a
drwx------. 2 username primarygroup 0 Jun  9 16:23 b

dir/a:
total 0

dir/b:
total 0

0777rootでこれを行い、ファイルとディレクトリに権限を与え、autofsを使用する代わりに手動でマウントしようとしましたが、同じ動作が発生しました。

関連メッセージがログに表示されないようです(私が正しいログを見ていない可能性があることを除外するわけではありません)。

アップデート1:SELinuxをオフにしても役に立ちません。ファイアウォールの電源を切っても機能しません。

アップデート2:autofsを再起動すると、その内容は消去されるようです(通常は再起動する必要があります)。ただし、すべての項目を一貫して削除するわけではありません。 2回再起動すると、追加のrm呼び出しがないか、rmdirフォルダが完全に消えます。しかし、まだ問題を再現できます。それでは、SMBサーバーには正しい情報が必要ですが、ローカルでは表現されない可能性がありますか?

アップデート3:開いてcifs使用して作成しましたecho 7 | sudo tee /proc/fs/cifs/cifsFYI。その後、より簡単なバージョンの手順を再実行すると、次のようになります。

$ mkdir --parent h/a

同時にログから以下を取得します。

Jun 12 16:04:56 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
$ rm --recursive h
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0x80000006 STATUS_NO_MORE_FILES
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0x80000006 STATUS_NO_MORE_FILES
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:12 localhost kernel: CIFS: Status code returned 0xc0000101 STATUS_DIRECTORY_NOT_EMPTY
$ rm --recursive h
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0x80000006 STATUS_NO_MORE_FILES
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000056 STATUS_DELETE_PENDING
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000056 STATUS_DELETE_PENDING
Jun 12 16:05:27 localhost kernel: CIFS: Status code returned 0xc0000056 STATUS_DELETE_PENDING
$ tree h
h
└── a

1 directory, 0 files
Jun 12 16:07:28 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:07:28 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:07:28 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:07:28 localhost kernel: CIFS: Status code returned 0x80000006 STATUS_NO_MORE_FILES
Jun 12 16:07:28 localhost kernel: CIFS: Status code returned 0xc0000034 STATUS_OBJECT_NAME_NOT_FOUND
Jun 12 16:07:28 localhost kernel: CIFS: Status code returned 0xc0000056 STATUS_DELETE_PENDING
Jun 12 16:07:28 localhost kernel: CIFS: Status code returned 0xc0000056 STATUS_DELETE_PENDING

ベストアンサー1

おすすめ記事