Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 48817

Summary: cp and rsync can no longer preserve times copying to smb mounts
Product: Gentoo Linux Reporter: Jeff Cunningham <jeffrey.k.cunningham>
Component: [OLD] Core systemAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED NEEDINFO    
Severity: normal CC: jeffrey, vapier
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jeff Cunningham 2004-04-23 13:22:03 UTC
Since I upgraded to the 2.6.5 kernel I started noticing copying errors whenever I try a command like: 'cp somefile /mnt/some_smb_mount/'. The error message I get is invariably: 

cp: preserving times for `/Models/Codes/dist/contourmap-20040423.tar.bz2': Operation not permitted

In fact, the file is copied. Prior to switching to the 2.6.5 kernel this command not only did not give the error message, but it did in fact preserve the modification time by default (obviously, vfat and ntfs filesystems mounted via smb don't have the other time attributes). 

rsync also fails, probably for the same reason, but here is its error message:

> rsync -tuv *20040423.tar.bz2 /Models/Codes/dist/
calcdr-20040423.tar.bz2
failed to set times on "/Models/Codes/dist/calcdr-20040423.tar.bz2": Operation not permitted

This also used to work (and continues to work on 2.4.25 kernel machines I have). 

Here is the /etc/fstab entry I'm using to mount with:

//136.202.83.183/groups /home/groups smbfs \
credentials=/home/jcunningham/.smbfscred,users, \
umask=0777,fmask=0777,dmask=0777,uid=1003,gid=100  0 0 

Its not a critical bug, but it is useful to be able to preserve modification times across these systems sometimes. 

-Jeff
Comment 1 Christian Andreetta (RETIRED) gentoo-dev 2004-09-20 04:56:33 UTC
seems like we lost this bug on the road, sorry... :-(
Do it still apply to the newer kernels? (I sincerly do think this is a kernel issue...)
Comment 2 Jeff Cunningham 2004-09-20 09:32:50 UTC
I have updated my kernel several times since then and the problem persists. 
Here is my current configuration:

> emerge info
Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.4.0, glibc-2.3.3.20040420-r0, 2.6.7-gentoo)
=================================================================
System uname: 2.6.7-gentoo i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu ftp://mirror.iawnet.sandia.gov/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo htpp://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d aalib acpi aim alsa apm auctex avi berkdb cdf clisp cmucl crypt cups directfb dnd doc dv dvd emacs encode esd ethereal evms2 faad fbcon fftw flac flash foomaticdb freetype fs gatos gcl gd gdbm gif gimpprint ginac glade glut gmtfull gmthigh gmtsuppl gmttria gphoto2 gpm gstreamer gtk gtk2 guile hdf5 idea imagemagick imap imlib imlib2 jack jack-caps java javascript jikes jpeg justify ladcca lcms ldap leim libg++ libwww lmtp mad maildir matroska mbox mcal md5sum mikmod milter mmx motif mozilla moznomail mozp3p mozsvg mpeg mpeg4 mysql ncurses netcdf nls nntp oav oggvorbis opengl oss pam pdflib perl plotutils png postgres ppds python qt quicktime readline ruby samba sasl sdl slang slp snmp speedo speex spell sse ssl svga t1lib tcltk tcpd tetex tiff transcode truetype type1 video_cards_i810 virus-scan wmf wsconvert x86 xface xine xml2 xmms xv xvid zlib"
Comment 3 Tiago Freire 2005-06-06 05:20:22 UTC
There is that silly one-second limitation on Windows FSes. They have a 2 second
granularity in time (only even times). Are you sure it is not just a warning
message which started to appear and didn't show up before? I may not be this
case, I am just pointing out one common problem (which was a hurdle I had to
solve on my system)?  
Comment 4 SpanKY gentoo-dev 2006-12-16 17:58:35 UTC
this is a kernel smbfs issue, not userspace samba
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-12-17 10:13:18 UTC
Is this still an issue with 2.6.19 using cifs instead of smbfs?
Comment 6 Jeff Cunningham 2006-12-23 09:55:36 UTC
I don't know. I no longer have a Windows machine to test with. Its been quite awhile. Sorry. 
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2006-12-25 15:27:22 UTC
ok