The gist is, whenever a directory has one or more files in it, it
can't be deleted. And it's pretty damn screwy that I can't figure this
out with a Google search.
F27 Server, F27 Workstation, i.e. Nautilus as well as smbclient
With Nautilus, I click on the target dir, click the delete button, I
get a dialog asking if I want it deleted permanently, and a red delete
button. I click the red delete button, the target dir vanishes but a.)
behind the scenes ssh'd into the server, the dir is still there b.) if
in Nautilus I click on a parent dir and then back to the containing
directory (refresh the directory that contains the directory I want
deleted) the target dir is still there.
When I do it with smbclient's rmdir command, no error. But it also
isn't deleted. No errors are logged on the server or the client.
I can do 'rm -rf' while logged in as the user (chris) who owns the
directory and the directory and contents are then deleted.
The target directory has the most permissive permissions I can imagine:
drwxrwxrwx. 1 chris chris 266 Jan 2 16:06 test
The directory which contains this directory:
drwxrwx---. 1 chris smbusers 286 Jan 2 16:06 scratch
[chris@f27s scratch]$ ls -la test
total 16
drwxrwxrwx. 1 chris chris 72 Jan 2 16:41 .
drwxrwx---. 1 chris smbusers 218 Jan 2 16:42 ..
-rwxrwxrwx. 1 chris chris 54 Nov 21 13:14 test1.txt
-rwxrwxrwx. 1 chris chris 529 Dec 17 00:19 test2.txt
-rwxrwxrwx. 1 chris chris 749 Dec 14 20:19 test3.txt
-rwxrwxrwx. 1 chris chris 1399 Dec 5 16:50 test4.txt
[chris@f27s scratch]$
So no hidden files. And yes the mount point (and everything under it)
has samba_share_t:s0 so this is not an selinux problem (and there are
no AVC errors).
If I delete the test$.txt files, select all the delete, they really
delete. And now I can delete the empty directory.
Haha! What the hell?! Maybe it's a feature that users can create
directories and files but can't effectively recursively delete a whole
directory??
I honestly cannot wait for the OMFG moment on this...
--
Chris Murphy
Show replies by date
OK I'm pretty sure this is either a gvfs-smb bug, or maybe even a
libsmbclient bug. And the reason why is because this problem doesn't
happen when I change the client to Windows 10, and macOS 10.13. The
target directory does delete in those two cases. Weird bug though.
Chris Murphy