Preserve date when cp over smbfs
    Martin P. Hansen 
    mph at lima.dyndns.dk
       
    Wed Dec 28 13:53:57 PST 2005
    
    
  
On Wed, 28 Dec 2005, Gilbert Cao wrote:
> When I copy a single file with the cp utility, with -p flag, to
> a smbfs mounted directory, the modification datetime is not preserved and it
> is set to the current datetime :
I've had this problem too, cp was also emitting a warning about utimes:
mph# mount -t smbfs -o-Eiso8859-1:cp850,-f660 //mph at light/e$ /mnt
mph% cp -p INFO /mnt
cp: utimes: /mnt/INFO: Operation not permitted
This was because I wasn't ``owner'' of the files. Adding the -u flag fixed this.
mph# mount -t smbfs -o-Eiso8859-1:cp850,-f660,-umph //mph at light/e$ /mnt
Now my modification time is preserved.
-- 
Martin P. Hansen                   |  ()  ASCII Ribbon Campaign
                                   |  /\  Against HTML Email!
    
    
More information about the freebsd-questions
mailing list