LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2009, 04:30 PM   #1
jaredk51
LQ Newbie
 
Registered: Aug 2009
Posts: 5

Rep: Reputation: 0
samba - windows files lose "created on" date stamp when moved to samba share on linux


I know linux doesn't support "created on" date stamps consequently when copying or moving files from windows hosts via samba shares to linux box running 2.6.18-128.el5 I lose the 'created on' date stamp for each file.

Is there a config setting in smb.conf option to retain this date stamp or some other work around.

Thanks in advance
 
Old 09-30-2009, 05:35 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
If you use the -p parameter while copying with cp, it should preserve the date. (see man cp) Or am I misunderstanding the question?
 
Old 09-30-2009, 08:10 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
I agree, try cp -p with one file and let us know what happens. Could be useful for all of us.
Use stat to check all 3 times (atime/ctime/mtime) http://linux.die.net/man/1/stat
 
Old 10-01-2009, 02:40 AM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by jaredk51 View Post
I know linux doesn't support "created on" date stamps consequently when copying or moving files from windows hosts via samba shares to linux box running 2.6.18-128.el5 I lose the 'created on' date stamp for each file.

Is there a config setting in smb.conf option to retain this date stamp or some other work around.

Thanks in advance
The problem is that Linux (and Unices in general) don't have a "created-on" date stamp. All appearance to the contrary, the "ctime" date field only reflects the last time a file's inode was changed, which could change for any number of reasons.

This means if you succeeded in getting a creation time, you would have nowhere to put it -- at least, nowhere reliable and immutable.
 
Old 11-09-2009, 04:00 PM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by chrism01 View Post
I agree, try cp -p with one file and let us know what happens. Could be useful for all of us.
Use stat to check all 3 times (atime/ctime/mtime) http://linux.die.net/man/1/stat
jaredk51, I take it your test was unsuccessful.
 
Old 02-19-2010, 03:13 PM   #6
jaredk51
LQ Newbie
 
Registered: Aug 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Sorry guys.... this got pushed above me in the hierarchy and I never looked back.
Its a non-issue for us anymore so I didn't try the fix.

thanks for the replies tho.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba does not create "samba/netlogon" and "samba/profiles" mianmajidali Linux - Server 0 04-27-2008 05:07 AM
What is the purpose of "share modes" in a samba share? Astol Linux - Software 4 11-28-2007 10:23 PM
shell script to mount samba share with " " in the remote path dohpaz Programming 2 10-20-2006 02:18 PM
Samba: "homes" share, cannot create directories, can create files Herg Linux - Software 1 09-14-2006 08:48 AM
Authenticating to Samba share using "Active Directory Server" hlslaughter Linux - Software 36 07-23-2004 10:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration