[Pkg-samba-maint] Bug#1055486: cifs-utils: Cannot copy files between 2 CIFS mounts on same client
Nikola Belavic
nbelavic at gmail.com
Tue Nov 7 08:15:50 GMT 2023
Package: cifs-utils
Version: 2:7.0-2
Severity: normal
X-Debbugs-Cc: nbelavic at gmail.com
Dear Maintainer,
My machine (client) is "alberto" Debian 12, 6.1.0-13-amd64 (smbclient 2:4.17.12+dfsg-0+deb12u1, cifs-utils 2:7.0-2)
CIFS are mounted from /etc/fstab:
nicols at alberto:~$ cat /etc/fstab | grep betelgeuse | egrep "doc|temp"
//betelgeuse/doc /mnt/betelgeuse/doc cifs file_mode=0660,dir_mode=0770,uid=1000,gid=1000,forceuid,forcegid,username=nicols,password=XXXXXXXXXX
//betelgeuse/temp /mnt/betelgeuse/temp cifs file_mode=0660,dir_mode=0770,uid=1000,gid=1000,forceuid,forcegid,username=nicols,password=XXXXXXXXXX
nicols at alberto:~$ mount | grep betelgeuse | egrep "doc|temp"
//betelgeuse/doc on /mnt/betelgeuse/doc type cifs (rw,relatime,vers=3.1.1,cache=strict,username=nicols,uid=1000,forceuid,gid=1000,forcegid,addr=10.33.33.16,file_mode=0660,dir_mode=0770,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1)
//betelgeuse/temp on /mnt/betelgeuse/temp type cifs (rw,relatime,vers=3.1.1,cache=strict,username=nicols,uid=1000,forceuid,gid=1000,forcegid,addr=10.33.33.16,file_mode=0660,dir_mode=0770,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1)
Create regular file:
nicols at alberto:~$ echo "test" > file.txt
nicols at alberto:~$ cat file.txt
test
Create directories on cifs mounts:
nicols at alberto:~$ mkdir /mnt/betelgeuse/temp/1
nicols at alberto:~$ mkdir /mnt/betelgeuse/doc/1
Copy this file on both targets:
nicols at alberto:~$ cp file.txt /mnt/betelgeuse/temp/1/
nicols at alberto:~$ cp file.txt /mnt/betelgeuse/doc/1/
Verify it is there:
nicols at alberto:~$ cat /mnt/betelgeuse/temp/1/file.txt
test
nicols at alberto:~$ cat /mnt/betelgeuse/doc/1/file.txt
test
Directories look normal:
nicols at alberto:~$ ls -al /mnt/betelgeuse/temp/1/
total 2048
drwxrwx--- 2 nicols nicols 0 stu 7 08:40 .
drwxrwx--- 2 nicols nicols 0 stu 7 08:37 ..
-rw-rw---- 1 nicols nicols 5 stu 7 08:37 file.txt
nicols at alberto:~$ ls -al /mnt/betelgeuse/doc/1/
total 1024
drwxrwx--- 2 nicols nicols 0 stu 7 08:41 .
drwxrwx--- 2 nicols nicols 0 stu 7 08:37 ..
-rw-rw---- 1 nicols nicols 5 stu 7 08:37 file.txt
Create another file, copy to first mountpoint and verify:
nicols at alberto:~$ echo "test test" > file2.txt
nicols at alberto:~$ cp file2.txt /mnt/betelgeuse/doc/1/
nicols at alberto:~$ cat /mnt/betelgeuse/doc/1/file2.txt
test test
nicols at alberto:~$ ls -al /mnt/betelgeuse/temp/1/
total 2048
drwxrwx--- 2 nicols nicols 0 stu 7 08:40 .
drwxrwx--- 2 nicols nicols 0 stu 7 08:37 ..
-rw-rw---- 1 nicols nicols 5 stu 7 08:40 file2.txt
-rw-rw---- 1 nicols nicols 5 stu 7 08:37 file.txt
Copy directly from one CIFS to another:
nicols at alberto:~$ cp /mnt/betelgeuse/temp/1/file2.txt /mnt/betelgeuse/doc/1/
cp: error copying '/mnt/betelgeuse/temp/1/file2.txt' to '/mnt/betelgeuse/doc/1/file2.txt': No such file or directory
On destionation dir, empty file is created:
nicols at alberto:~$ ls -al /mnt/betelgeuse/doc/1/
total 1024
drwxrwx--- 2 nicols nicols 0 stu 7 08:41 .
drwxrwx--- 2 nicols nicols 0 stu 7 08:37 ..
-rw-rw---- 1 nicols nicols 0 stu 7 08:41 file2.txt
-rw-rw---- 1 nicols nicols 5 stu 7 08:37 file.txt
nicols at alberto:~$ cat /mnt/betelgeuse/temp/1/file2.txt
nicols at alberto:~$
Only way I can make this cp works is if i put "vers=1.0" in nounting options.
On another machine i have (Ubuntu 20.04.6 LTS, 5.4.0-152-generic, cifs-utils 2:6.9-1ubuntu0.2, smbclient 2:4.15.13+dfsg-0ubuntu0.20.04.2)
everything works as expected (with same mount options, vers=3.1.1)
I am sorry if this doesn't belong here, i am new to this bug reporting stuff :)
Regards
Nikola
-- System Information:
Debian Release: 12.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-13-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages cifs-utils depends on:
ii libc6 2.36-9+deb12u3
ii libcap-ng0 0.8.3-1+b3
ii libgssapi-krb5-2 1.20.1-2+deb12u1
ii libkeyutils1 1.6.3-2
ii libkrb5-3 1.20.1-2+deb12u1
ii libpam0g 1.5.2-6+deb12u1
ii libtalloc2 2.4.0-f2
ii libwbclient0 2:4.17.12+dfsg-0+deb12u1
ii python3 3.11.2-1+b1
Versions of packages cifs-utils recommends:
ii keyutils 1.6.3-2
Versions of packages cifs-utils suggests:
ii bash-completion 1:2.11-6
ii smbclient 2:4.17.12+dfsg-0+deb12u1
pn winbind <none>
-- no debconf information
More information about the Pkg-samba-maint
mailing list