Laurenz, Dirk
2004-Oct-12 07:31 UTC
[Samba] Two Questions concerning samba - file access times - two instances on one server
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.
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...
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@fujitsu-siemens.com
Internet: http://www.fujitsu-siemens.com
http://www.fujitsu-siemens.de/rl/servicesupport/itdienstleistungen/competencecenter.html
*******************************************************************************************************************
Laurenz, Dirk
2004-Oct-13 19:53 UTC
[Samba] Two Questions concerning samba - file access times - two instances on one server
Hi,
-|
-| Da w?re dann noch von Interesse was sich den sonst noch
-| unterscheidet,
-| 1. Dateisystem
-| 2. Filelocking
-| 3. Ist dos filetime gesetzt?
-|
-| Wurde mit dem gleichen Client getestet?
-| Bei 3.0.7 wie unterschiedlich sind die Zeiten denn?
i compared the share options and applied an additional share option
to the 3.0.7 box. It was: nt acl support = yes and now it works...
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@fujitsu-siemens.com
Internet: http://www.fujitsu-siemens.com
http://www.fujitsu-siemens.de/rl/servicesupport/itdienstleistungen/competencecenter.html
*******************************************************************************************************************
Laurenz, Dirk
2004-Oct-13 19:53 UTC
[Samba] Two Questions concerning samba - file access times - two instances on one server
Hello,
-| -----Original Message-----
-| From: Holger Krull [mailto:holger.krull@gmx.de]
-| Sent: Tuesday, October 12, 2004 9:57 AM
-| To: Laurenz, Dirk
-| Subject: Re: [Samba] Two Questions concerning samba - file
-| access times - two instances on one server
-|
-|
-| > 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.
-|
-| That's because most applications (all MS Office apps)
-| create a new file,
-| delete the old one and rename the new one. The in reality
-| it is a new
-| file, therefore new create time.
-| MS Servers cache the old attributes for some while, and
-| reapply them,
-| samba does not.
on another box (in this case 3.0.4) this happens not.
on the other (3.0.7) times won't be set correctly...
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@fujitsu-siemens.com
Internet: http://www.fujitsu-siemens.com
http://www.fujitsu-siemens.de/rl/servicesupport/itdienstleistungen/competencecenter.html
*******************************************************************************************************************
Igor Belyi
2004-Oct-16 06:32 UTC
[Samba] Re: Two Questions concerning samba - file access times - two instances on one server
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@fujitsu-siemens.com > Internet: http://www.fujitsu-siemens.com > http://www.fujitsu-siemens.de/rl/servicesupport/itdienstleistungen/competencecenter.html > ******************************************************************************************************************* >
CHAN YICK WAI schrieb:> Just would like to ask if anyone has experience with Samba with XP SP2, can > you share with us? > > Thanks, > Yw >Hi, for sure we share : it works read the samba faqs for more info, and/or give us more detailed questions Regards
Hi Walter, relate to your answers i would say your win drivers arent very compatibel to win xp sp2, have you tried to get the printer directly connected to a win xp serv pack2 machine using with the same drivers? if the buggy behavior stay with lokal conected drivers and printer you know that you have to wait for better drivers or trying another setup maybe using ghostscript drivers wih cups and/or raw printing. Best Regards Walter Willmertinger schrieb:> > > rruegner schrieb: > >> Hi Walter, >> i have the same setup samba 3.07 , cups win xp serv pack 2 german. >> I have noticed that something changed in behavior after the upgrade to >> win xp serv pack 2 , but non of your described failures are comming >> up in my setups for hp laser printers , and canon bjc 2000 as well as >> my pdf printer. >> I only noticed after upgrade to serv pack 2 that ich have to refresh >> the pinter icon in the taskbar now after printing is done to disapear. >> also my standart paper size is now switching to letter and not staying >> to default dina 4. >> But i have not upgraded my cups or/and win drivers ( which is allways >> recomended ), i wanted to cotroll this stuff these days but as this >> bugs are not really heavy for me , i will wait until there is time. >> I dont think this is really a problem with samba. >> Are you using cups? > > > YES, I think it is cups 1.1.20 > >> How is your smb.conf > > > very simple: Here the relevant parts: > > # Global parameters > [global] > workgroup = CSINTERN > server string = col Samba Server on RedHat > log file = /usr/local/samba/var/log.%m > max log size = 100000 > deadtime = 60 > preferred master = No > domain master = No > ldap ssl = no > printer admin = root, walterw, fritzw, gerhardj > hosts allow = 192.168.1. > > > [homes] > comment = Home Directories > read only = No > create mask = 0750 > > [printers] > comment = All Printers > path = /var/spool/samba > printer admin = root, walterw > create mask = 0700 > guest ok = Yes > printable = Yes > use client driver = Yes > browseable = No > > [print$] > comment = Share fuer Printer Treiber > path = /usr/local/samba/lib/printers > write list = root, walterw, fritzw, gerhardj > > [kyocera-ps] > comment = Kopierdrucker mit Duplexfunktion > path = /var/spool/samba > printer admin = root, walterw > read only = No > create mask = 0700 > guest ok = Yes > printable = Yes > printer name = KYOCERA > use client driver = Yes > oplocks = No > share modes = No > > ************************************** > > >> , have you checked cups logs, > > > nothing special! > >> do you have the latest printers? > > > Yes, actual drivers > >> What are this Printers ( Manufacter ) > > > Kyocera, HP ... > >> Have disabled the xp firewall > > > Tried with and without firewall > >> as well as the webclient services on xp, > > > tried with enabled and disabled > >> what are the event logs talking at the win xp? > > > only on XP startup I get an error message: > you can see in the appended temp.jpg > If you don't see it: > It is a message in sytem part. > Source is MRxSmb > Type is warning > Event number is 3019 > Text is: ( if I try to translate): Redirector Service cannot recognize > the type of connection > >> Is file sharing running corect with your samba machine? > > > Yes, no problem, even with MS Access > >> Is it a stand alone spooler , > > > ??? > >> do you do accounting, > > > nothing setup > >> are you printing >> via a printserver device > > > yes, network print server, done over CUPS > >> or direct over lpd/usb > > > no! > >> Do you use postscript/ghostscript filters, or direct win drivers? > > > direct win drivers > >> All this stuff must be tested and controlled to give you the right >> answer/help...there is no naturally reason why printing with samba >> should fail with win xp as far i know > > > It does not fail, the startup of the print dialogue is just very slow !! > When removing SP2, the problem has gone! > >> Best Regards >> Walter Willmertinger schrieb: >> >>> We have problems with printing after installing XP SP2. >>> In nearly every software it takes about 10 seconds to 30 seconds, if >>> you click on "Print-Button" and wait for the print dialogue window. >>> Extremly slow are programs like MS Word (30 seconds, when you open a >>> document the first time). >>> >>> Another problem, (but I am sure it's not a samba related problem): In >>> some word documents you have problems viewing embedded graphics. >>> Sometimes you see the graphics, sometimes not. It is not a problem >>> with wrong settings (View - Use placeholders for Graphics). In >>> preview there is no graphics, maybe after some scrolling the graphics >>> appear, on the printout graphics are contained. >>> >>> Samba installed is 3.0.7 (compiled on RH 9.0 with standard options)! >>> >>> Regards, Walter >>> >>> rruegner schrieb: >>> >>>> CHAN YICK WAI schrieb: >>>> >>>>> Just would like to ask if anyone has experience with Samba with XP >>>>> SP2, can >>>>> you share with us? >>>>> >>>>> Thanks, >>>>> Yw >>>>> >>>> Hi, for sure we share : it works >>>> read the samba faqs for more info, and/or give us more detailed >>>> questions >>>> Regards >>> >>> >>> >>> >>> >> >