FS#76087 - [smbclient] Can not copy directories into smb share with smbclient 4.17.0-1
Attached to Project:
Arch Linux
Opened by UrbenLegend (UrbenLegend) - Sunday, 02 October 2022, 01:31 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 11 October 2022, 13:43 GMT
Opened by UrbenLegend (UrbenLegend) - Sunday, 02 October 2022, 01:31 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 11 October 2022, 13:43 GMT
|
Details
Description:
After updating to smbclient 4.17.0-1, Nautilus pops up a permission error when attempting to copy a local directory into a smb share mounted directly by Nautilus (gvfs). The curious thing is that manually creating the directory on the smb share and then copying individual files into that directory works fine, which demonstrates it isn't a Samba configuration issue. Downgrading to smbclient 4.16.5, samba 4.16.5, and ldb 2.5.2 fixes the issue. Additional info: * package version(s) smbclient 4.17.0-1 Steps to reproduce: 1. Upgrade to smbclient and samba 4.17.0-1 2. Mount a smb share with Nautilus 3. Attempt to copy a local directory with some files in it. 4. Notice the permission error. 5. Manually create the directory on the smb share 6. Copy individual files into the newly created directory 7. Notice that it works fine. |
This task depends upon
Closed by Tobias Powalowski (tpowa)
Tuesday, 11 October 2022, 13:43 GMT
Reason for closing: Fixed
Additional comments about closing: 4.17.0-2
Tuesday, 11 October 2022, 13:43 GMT
Reason for closing: Fixed
Additional comments about closing: 4.17.0-2
> https://bbs.archlinux.org/viewtopic.php?id=279992
I did a quick strace, hope this helps:
❯ strace cp -R ~/test-folder/ .
execve("/usr/bin/cp", ["cp", "-R", "/home/tile/test-folder/", "."], 0x7ffe4b7d89e8 /* 59 vars */) = 0
brk(NULL) = 0x5637a1975000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffdf20179b0) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7744c0c000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=186223, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 186223, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7744bde000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libacl.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=34680, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 36896, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7744bd4000
mprotect(0x7f7744bd6000, 24576, PROT_NONE) = 0
mmap(0x7f7744bd6000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f7744bd6000
mmap(0x7f7744bda000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f7744bda000
mmap(0x7f7744bdc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f7744bdc000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=26488, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 28696, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7744bcc000
mmap(0x7f7744bce000, 12288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f7744bce000
mmap(0x7f7744bd1000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7f7744bd1000
mmap(0x7f7744bd2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7f7744bd2000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P4\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1953472, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1994384, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f77449e5000
mmap(0x7f7744a07000, 1421312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f7744a07000
mmap(0x7f7744b62000, 356352, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17d000) = 0x7f7744b62000
mmap(0x7f7744bb9000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d4000) = 0x7f7744bb9000
mmap(0x7f7744bbf000, 52880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7744bbf000
close(3) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f77449e2000
arch_prctl(ARCH_SET_FS, 0x7f77449e2740) = 0
set_tid_address(0x7f77449e2a10) = 15717
set_robust_list(0x7f77449e2a20, 24) = 0
rseq(0x7f77449e3060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f7744bb9000, 16384, PROT_READ) = 0
mprotect(0x7f7744bd2000, 4096, PROT_READ) = 0
mprotect(0x7f7744bdc000, 4096, PROT_READ) = 0
mprotect(0x5637a0040000, 4096, PROT_READ) = 0
mprotect(0x7f7744c3f000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f7744bde000, 186223) = 0
getrandom("\xcd\x8e\x5e\x96\xe9\xf3\x08\x31", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x5637a1975000
brk(0x5637a1996000) = 0x5637a1996000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3407104, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 3407104, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f77446a2000
close(3) = 0
geteuid() = 1000
newfstatat(AT_FDCWD, "/home/tile/test-folder/", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "test-folder", 0x7ffdf20174e0, AT_SYMLINK_NOFOLLOW) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2998
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "cp: ", 4cp: ) = 4
write(2, "cannot stat './test-folder'", 27cannot stat './test-folder') = 27
openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": Permission denied", 19: Permission denied) = 19
write(2, "\n", 1
) = 1
lseek(0, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
close(0) = 0
close(1) = 0
close(2) = 0
exit_group(1) = ?
+++ exited with 1 +++
FS#76158(patch available)