Why does not the rmdir command fail when deleting a non-empty directory from a CIFS share mounted with version higher than 1.0 in RHEL 7 ?
Issue
- The command
rmdirwrongly returnsrc=0when deleting a directory that it's not empty in a CIFS share mounted with version >1.0:
root@rhel-7.3 # cd /cifsmount/ && mkdir directorytest && touch directorytest/filetest
root@rhel-7.3 # rmdir directorytest
root@rhel-7.3 # echo $?
0
- It's expected that the command
rmdirwill return a return code different than0because this command cannot delete directories that are not empty.
Environment
Red Hat Enterprise Linux 7.3
kernel-3.10.0-514.el7.x86_64
CIFS shared mounted with version > 1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.