Hi all, I searched the archives for a solution to this issue but didn't find any thing. I have an office with a mix of PCs running ME and XP that use Samba 2.2.7 under RH Linux 7.3 as an archive for mortgage information. When documents are moved to the Samba share, the file creation timestamp on the Linux box reflects the time the files were created on the PCs. What I need is for the creation timestamp to be when it was created on the Linux box by the copy or move. We have some scripts that execute every 20 minutes that use find to locate new files added within that time frame. Files are falling through the cracks because the script sees the original PC creation time and not the Linux creation time. Any insight on how to remedy this will be great appreciated! Mike Mike McMullen CIO - Baton, Inc. 7637 Fair Oaks Blvd Suite #2 Carmichael, CA 95608 Tel: 1-866-515-4421 or 916-944-7790 ext. 2 Fax: 1-866-843-8795 or 916-944-8422 Email: mlm@loanprocessing.net Web: www.loanprocessing.net "From chaos comes true genius..."
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 18 Jan 2003, Mike McMullen wrote:> Hi all, > > I searched the archives for a solution to this issue > but didn't find any thing. > > I have an office with a mix of PCs running ME and XP > that use Samba 2.2.7 under RH Linux 7.3 as an archive > for mortgage information. > > When documents are moved to the Samba share, the file > creation timestamp on the Linux box reflects the time the files > were created on the PCs. What I need is for the creation > timestamp to be when it was created on the Linux box by > the copy or move. > > We have some scripts that execute every 20 minutes that > use find to locate new files added within that time frame. > Files are falling through the cracks because the script > sees the original PC creation time and not the Linux creation > time. > > Any insight on how to remedy this will be great appreciated!You might be able to use the "map archive" parameter to help out. The creation date on a file on a Samba share is really the mod time of the file. Unix file systems only store 3 times (atime, ctime, & mtime). cheers, jerry ---------------------------------------------------------------------- Hewlett-Packard ------------------------- http://www.hp.com SAMBA Team ---------------------- http://www.samba.org GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 "SAMS Teach Yourself Samba in 24 Hours" 2ed "You can never go home again, Oatman, but I guess you can shop there." --John Cusack - "Grosse Point Blank" (1997) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE+KXMDIR7qMdg1EfYRAsUlAJ92SvnrUrgJ+azEQ5k35017kcMOZQCgy0ZW /dlNHmQjJL+29/n+uXKAK3w=nMks -----END PGP SIGNATURE-----
Just free associating here. The parameter dos filetimes may relate to your situation. If samba does not have an easy way of doing this, you might get creative. You might use force create mode to change the permissions of the file when it is transferred (created?) to the samba share. For example, you might make any new file transferred up to be unreadable by anyone but the owner. Or, you could use force user to make it owned by some bogus owner like newfile (which may have to exist). Then, every minute, on the server run a script which touch'es any file with those ownership or permissions characteristics. This script could also change the file permission/ownership back to what they should be. Joel On Sat, Jan 18, 2003 at 01:35:31AM -0800, Mike McMullen wrote:> Hi all, > > I searched the archives for a solution to this issue > but didn't find any thing. > > I have an office with a mix of PCs running ME and XP > that use Samba 2.2.7 under RH Linux 7.3 as an archive > for mortgage information. > > When documents are moved to the Samba share, the file > creation timestamp on the Linux box reflects the time the files > were created on the PCs. What I need is for the creation > timestamp to be when it was created on the Linux box by > the copy or move. > > We have some scripts that execute every 20 minutes that > use find to locate new files added within that time frame. > Files are falling through the cracks because the script > sees the original PC creation time and not the Linux creation > time. > > Any insight on how to remedy this will be great appreciated! > > Mike > > > Mike McMullen > > CIO - Baton, Inc. > > 7637 Fair Oaks Blvd Suite #2 > Carmichael, CA 95608 > > Tel: 1-866-515-4421 or 916-944-7790 ext. 2 > Fax: 1-866-843-8795 or 916-944-8422 > Email: mlm@loanprocessing.net > Web: www.loanprocessing.net > > "From chaos comes true genius..." > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Here is what man smb.conf has to say: dos filetimes (S) Under DOS and Windows, if a user can write to a file they can change the timestamp on it. Under POSIX semantics, only the owner of the file or root may change the timestamp. By default, Samba runs with POSIX semantics and refuses to change the timestamp on a file if the user smbd is acting on behalf of is not the file owner. Setting this option to true allows DOS semantics and smbd will change the file timestamp as DOS requires. Default: dos filetimes = no Now, it may be that the user smbd is running under doesn't own the file. But, it may be that dos filetimes won't, at least by themselves, solve this problem. See my other post about a brute force workaround. Joel On Sat, Jan 18, 2003 at 09:34:08AM -0800, Mike McMullen wrote:> Hi Joel, > > Thanks for the response. I have set dos filetimes = yes in the conf > file but that doesn't seem to have an effect. > > Thanks, > > Mike > ----- Original Message ----- > From: "Joel Hammer" <Joel@HammersHome.com> > To: "Mike McMullen" <mlm@loanprocessing.net>; <samba@lists.samba.org> > Sent: Saturday, January 18, 2003 9:08 AM > Subject: Re: [Samba] File Creation Dates Question > > > > Just free associating here. > > > > The parameter dos filetimes may relate to your situation. > > > > If samba does not have an easy way of doing this, you might get > > creative. You might use force create mode to change the permissions > > of the file when it is transferred (created?) to the samba share. For > > example, you might make any new file transferred up to be unreadable > > by anyone but the owner. Or, you could use force user to make it owned > > by some bogus owner like newfile (which may have to exist). Then, > > every minute, on the server run a script which touch'es any file with > > those ownership or permissions characteristics. This script could also > > change the file permission/ownership back to what they should be. > > > > Joel > > > > > > > > On Sat, Jan 18, 2003 at 01:35:31AM -0800, Mike McMullen wrote: > > > Hi all, > > > > > > I searched the archives for a solution to this issue > > > but didn't find any thing. > > > > > > I have an office with a mix of PCs running ME and XP > > > that use Samba 2.2.7 under RH Linux 7.3 as an archive > > > for mortgage information. > > > > > > When documents are moved to the Samba share, the file > > > creation timestamp on the Linux box reflects the time the files > > > were created on the PCs. What I need is for the creation > > > timestamp to be when it was created on the Linux box by > > > the copy or move. > > > > > > We have some scripts that execute every 20 minutes that > > > use find to locate new files added within that time frame. > > > Files are falling through the cracks because the script > > > sees the original PC creation time and not the Linux creation > > > time. > > > > > > Any insight on how to remedy this will be great appreciated! > > > > > > Mike > > > > > > > > > Mike McMullen > > > > > > CIO - Baton, Inc. > > > > > > 7637 Fair Oaks Blvd Suite #2 > > > Carmichael, CA 95608 > > > > > > Tel: 1-866-515-4421 or 916-944-7790 ext. 2 > > > Fax: 1-866-843-8795 or 916-944-8422 > > > Email: mlm@loanprocessing.net > > > Web: www.loanprocessing.net > > > > > > "From chaos comes true genius..." > > > > > > -- > > > To unsubscribe from this list go to the following URL and read the > > > instructions: http://lists.samba.org/mailman/listinfo/samba > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: http://lists.samba.org/mailman/listinfo/samba > > >
I just ran for i in `find . -maxdepth 1 -perm 000` do touch $i chmod 777 $i done on a directory with 1700 files. It found, touch'ed, and chmod'ed 17 files with 000 permissions in less than one second on an AMD 267 mh. find is an executable binary, not some slow perl or bash script. So, it may not be too great a burden on your cpu to run this find command every minute. Give the speed of the find command, is there a reason why you wouldn't just send the email message every minute, instead of waiting 5 minutes between messages. Or, run the find command every five minutes, then the email command. The inability of samba to automatically change the access times of uploaded files sounds like a feature, not a bug! Joel On Sun, Jan 19, 2003 at 01:31:21PM -0800, Mike McMullen wrote:> Hi Joel, > > > > I lost my email from Saturday. File corruption. > > > > Anyway, if you responded to my suggestion of running a script to solve > > your file access time problems I didn't see it. > > > > Joel > > > > Below is what I sent. > > Thanks, > > Mike > > > Hi Joel, > > I had already set dos filetimes=yes. I still see > the same behavior. As a test I tried copying a > file from one pc to another pc. The file creation > timestamp on the copy retains the original file > creation time. > > Seems like a strange behavior to me. The reason > I'm a little loathe to run a find every minute is this could > very soon be up to a thousand files a day or more. > > The group effected the most by this is our scanning and > indexing folks. They take paper files and TIFF format > faxes received, break them into individual documents, index > them according to document type and drop them into directories > where the assigned loan processor can view them. > > Every 5 minutes a small script runs and using find walks > the file system to see what's been added. If new documents > have been found, an HTML email is sent to the loan processor > and those who have access to that loan, to inform them of > documents to review. > > One solution would be to have the indexor touch the files > before they are filed which would give a correct time stamp. > > It just seems there should be a setting to say give me a new > timestamp, not keep the old timestamp. > > Thanks for your help, > > Mike > > Mike McMullen > > CIO - Baton, Inc. > > 7637 Fair Oaks Blvd Suite #2 > Carmichael, CA 95608 > > Tel: 1-866-515-4421 or 916-944-7790 ext. 2 > Fax: 1-866-843-8795 or 916-944-8422 > Email: mlm@loanprocessing.net > Web: www.loanprocessing.net > > "From chaos comes true genius..." >