[Samba] File Creation Dates Question

Joel Hammer Joel at HammersHome.com
Sat Jan 18 17:53:01 GMT 2003


I didn't say this, but the find command would be the way to locate
files with certain ownership or time characteristics. For example,
if you changed the permissions to octal 000 on each file as it came in
from the PC, the following command would find then for you:

cd samba_directory
for i in `find . -maxdepth 1 -perm 000  -type f`
do
touch "$i"
chmod 770 "$i"
done

Have this as a cron job, running with root privilege maybe, every minute.

Joel


On Sat, Jan 18, 2003 at 12:08:22PM -0500, Joel Hammer wrote:
> 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 at 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



More information about the samba mailing list