[Samba] Re: Two Questions concerning samba - file access times - two instances on one server

Igor Belyi sambauser at katehok.ac93.org
Sat Oct 16 06:31:56 GMT 2004


Laurenz, Dirk wrote:
> Hello everybody,
> 
> i have two questions concerning samba.
> 
> 1st Topic - file times
> 	NTFS has three file times for each file,
> 	the create time, the change time and the
> 	access time. The create time will never be
> 	modified, the change time will be changed
> 	every time you save a file, the access time
> 	will be changed every time you access (read)
> 	a file. If i access a file on a samba share,
> 	the access time will be modified correctly,
> 	but if i resave a file, the create time is
> 	also changed although i would expect that only
> 	the change time will be modified. I found some
> 	parameters concerning file times, but none
> 	of them changes the behaviour. I used the following
> 	parameters:
> 	dos filetimes = yes
> 	dos filetime resolution = yes
> 	Has anyone a suggestion, which parameters must be
> 	set, to get the NTFS behaviour? B.t.w., the underlying
> 	filesystem is an ext3 with acl,user_xattr mount options.

It's more like an ext3 question...
NTFS has create, modify, and access timestamps whereas
ext3 has change, modify, and access ones.

According to my experiments on NTFS:
'create' really never changed.
'modify' changes whenever file is saved.
'access' changes whenever property of the file (Permissions or its name) 
get changed.
reading file does not change any timestamp at least when I read a text 
file with Notepad.exe.

According to my experiments on ext3:
'change' changes whenever property of the file (access mask, owner) get 
changed or file is saved.
'modify' changes whenever file is saved.
'access' changes whenever content of the file accessed.
There's no timestamp keeping creation of the file.

ext3's 'access' get mapped into NTFS 'access'
ext3's 'modify' get mapped into NTFS 'modify' and 'create'.

I don't see any way for Samba to simulate NTFS timestamps unless there's 
some extra attributes which can be used on ext3 for timestamps.

> 2nd Topic - two instances on one server
> 	I have successfully running two instances on one server.
> 	Both are members in an NT4 Domain and every thing works
> 	right, but local username resolution and groupmappings.
> 	Normal startup order is:
> 	- Instance A
> 	- Instance B
> 	Setting some groupmappings works fine for Instance B.
> 	if i restart Instance A but not B, the groupmappings/usermappings 
> 	from Instance A get effective. And thats very bad....
> 	If i restart afterwards Instance B, everything is fine.
> 	I guess, this is a winbind issue. The problem is, I think,
> 	the last started winbindd wins...

Unfortunately, 'idmap backend' understand only LDAP as a backend choice 
and if you don't set it mapping get saved in winbindd_idmap.tdb cache 
file which is common for both servers.
You can switch to 'ldap' idmap method and then specify different 'idmap 
suffix' for each of your servers.
Another solution will be to patch Samba so that it accepts 'tdb' with a 
file name as an argument for 'idmap backend' parameter.

Hope it helps,
Igor

> 	Here are my conf's (INSTANCE A and B)
> 
> INSTANCE A
> ##############################################################################
> [global]
>         name resolve order = lmhosts, wins, bcast
>         private dir = /samba/ages001/conf/private/
>         idmap gid = 10000-40000
>         debug uid = yes
>         host msdfs = yes
>         wtmp directory = /samba/ages001/conf/wtmp
>         lock directory = /samba/ages001/conf/locks/
>         netbios name = ages001
>         printing = none
>         idmap uid = 10000-40000
>         workgroup = XXXXXX
>         os level = 20
>         socket address = 192.168.84.34
>         security = domain
>         winbind separator = +
>         log file = /samba/ages001/conf/log/%m.log
>         load printers = yes
>         smb passwd file = /samba/ages001/conf/private/smbpasswd
>         loglevel = 10
>         wins server = 193.29.124.81 193.29.122.75
>         pid directory = /samba/ages001/conf/pids/
>         interfaces = 192.168.84.34/24
>         username map = /samba/ages001/conf/private/smbusers
>         domain master = No
>         encrypt passwords = yes
>         template shell = /bin/bash
>         winbind enum users = yes
>         password server = SRVA SRVB SRVC
>         template homedir = /samba/ages001/data/winbindjail
>         winbind enum groups = yes
>         preferred master = no
>         unix charset = UTF-8
>         utmp directory = /samba/ages001/conf/utmp
>         winbind cache time = 300
>         socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT
> 
> [dfsroot]
>         comment         = XXXXXX
>         msdfs root      = yes
>         path            = /samba/ages001/data/dfsroot/dfsroot_a
>         hide files      = /lost+found/
>         hide dot files = yes
>         read only       = yes
> ###################################################################################
> 
> INSTANCE B
> ###################################################################################
> [global]
>         private dir = /samba/ages002/conf/private
>         name resolve order = lmhosts, wins, bcast
>         idmap gid = 10000-20000
>         wtmp directory = /samba/ages002/conf/wtmp
>         lock directory = /samba/ages002/conf/locks
>         netbios name = AGES002
>         writeable = yes
>         idmap uid = 10000-20000
>         workgroup = XXXXX
>         os level = 20
>         socket address = 192.168.84.35
>         security = domain
>         winbind separator = +
> 
>         log level = 1
>         log file = /samba/ages002/conf/log/%m.log
>         smb passwd file = /samba/ages002/conf/private/smbpasswd
>         load printers = No
>         map hidden = yes
>         socket options = SO_SNDBUF=4096 SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT
>         pid directory = /samba/ages002/conf/pids
>         wins server = 193.29.124.81, 193.29.122.75
>         username map = /samba/ages002/conf/private/smbusers
>         interfaces = 192.168.84.35/255.255.255.0
>         domain master = No
>         encrypt passwords = yes
>         template shell = /bin/bash
>         password server = SRVA SRVB SRVC
>         winbind nested groups = Yes
>         template homedir = /samba/ages002/data/tmp/winbindjail
>         preferred master = no
>         unix charset = UTF8
>         utmp directory = /samba/ages002/conf/utmp
>         winbind enum users = no
>         winbind enum groups = no
> 
> 
> [GES_BT]
>         browseable = yes
>         inherit permissions = yes
>         writable = yes
>         admin users = XXXXXX+GESIS_ADM
>         hide unreadable = yes
>         path = /samba/ages002/data/GES_BT
>         hide files = /lost+found/
>         hide dot files = yes
>         hide special files = yes
>         inherit acls = yes
>         dos filetimes = yes
>         dos filetime resolution = yes
> 
> [....]
> 
> ######################################################################
> Mit freundlichem Gruß,
> 
> 
> 
> Dirk Laurenz
> Systems Engineer	
> 
> Fujitsu Siemens Computers
> Sales Central Europe Deutschland 
> Professional Service Organisation Nord / Ost
> 
> Hildesheimer Strasse 25
> 30880 Laatzen
> Germany
> 
> Telephone:	+49 (511) 84 89 - 18 08
> Telefax:	+49 (511) 84 89 - 25 18 08
> Mobile:	+49 (170) 22 10 781
> Email:	mailto:dirk.laurenz at fujitsu-siemens.com
> Internet:	http://www.fujitsu-siemens.com
>             http://www.fujitsu-siemens.de/rl/servicesupport/itdienstleistungen/competencecenter.html
> *******************************************************************************************************************
>  



More information about the samba mailing list