Colin Coe
2009-May-28 00:57 UTC
[Samba] App fails writing file but zero length file on Samba server
Hi all I've googled but not found any thing on the problem I'm having. I'm contracting with a utilities company that uses General Electric's ENMAC software. This runs on RHEL4 and makes use of Samba but it only works with Samba 1.9.18p10 compiled with this patch: --- diff -Naur samba-1.9.18p10/source/includes.h samba-1.9.18p10_good/source/includes.h --- samba-1.9.18p10/source/includes.h 1998-08-20 07:41:46.000000000 +0800 +++ samba-1.9.18p10_good/source/includes.h 2008-01-11 10:39:49.000000000 +0900 @@ -1176,7 +1177,7 @@ #include <sys/ipc.h> #include <sys/sem.h> #include <sys/shm.h> -#ifdef NO_SEMUN +#ifdef _SEM_SEMUN_UNDEFINED union semun { int val; struct semid_ds *buf; --- As I'm trying to streamline the building of these servers, I thought I'd try upgrading Samba to a reasonably current version. I'm trying with latest version of Samba shipped by RedHat (3.0.33-0.17.el4). When an edit is made and then saved in the application, the application responds with 'Failed to open file for writing' and on the Samba server a zero length file of the correct name appears. This works just fine with the patched Samba 1.9.18p10. The smb.conf files are attached. Does anyone have any ideas on how to make this work without patching Samba? TIA CC -- Sent from my computer -------------- next part -------------- debuglevel = 2 syslog = 1 syslog only = No protocol = NT1 security = SHARE max disk size = 0 lpq cache time = 10 announce as = NT encrypt passwords = No update encrypted = No getwd cache = Yes read prediction = No read bmpx = Yes read raw = Yes write raw = Yes use rhosts = No load printers = Yes null passwords = No strip dot = No interfaces bind interfaces only = No networkstation user login = No password server socket options = TCP_NODELAY netbios name netbios aliases smbrun = /usr/local/samba/bin/smbrun log file = /usr/local/samba/var/log.%m config file smb passwd file = /usr/local/samba/private/smbpasswd hosts equiv preload server string = Samba Server printcap name = /etc/printcap lock dir = /usr/local/samba/var/locks root directory = / default service message command dfree command passwd program = /usr/local/samba/bin/smbpasswd passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed* passwd chat debug = No valid chars workgroup = DEV username map #character set logon script logon path = \\%N\%U\profile logon drive logon home = \\%N\%U remote announce remote browse sync socket address = 0.0.0.0 homedir map announce version = 4.2 max log size = 50 mangled stack = 50 max mux = 50 max xmit = 65535 max packet = 65535 name resolve order = lmhosts host wins bcast packet size = 65535 password level = 0 username level = 0 keepalive = 0 deadtime = 0 time offset = 0 read size = 16384 shared mem size = 102400 coding system client code page = 850 os level = 95 max ttl = 14400 max wins ttl = 259200 min wins ttl = 21600 lm announce = Auto lm interval = 60 dns proxy = Yes wins support = No wins proxy = No wins server preferred master = Yes local master = Yes domain master = No domain logons = No browse list = Yes unix realname = No NIS homedir = No unix password sync = No time server = No ole locking compatibility = Yes printer driver file = /usr/local/samba/lib/printers.def # Default service parameters comment #copy #include exec postexec root preexec root postexec alternate permissions = No revalidate = No default case = lower case sensitive = No preserve case = Yes short preserve case = Yes mangle case = No mangling char = ~ browseable = Yes available = Yes path username guest account = nobody invalid users valid users admin users read list write list volume force user force group read only = Yes max connections = 0 min print space = 0 create mask = 0744 force create mode = 00 directory mask = 0755 force directory mode = 00 set directory = No status = Yes hide dot files = Yes delete veto files = No veto files hide files veto oplock files guest only = No guest ok = No print ok = No postscript = No map system = No map hidden = No map archive = Yes locking = Yes strict locking = No share modes = Yes oplocks = No only user = No wide links = Yes follow symlinks = Yes sync always = No strict sync = No mangled names = Yes fake oplocks = No printing = bsd print command = lpr -r -P%p %s lpq command = lpq -P%p lprm command = lprm -P%p %j lppause command lpresume command queuepause command queueresume command printer printer driver = NULL printer driver location hosts allow hosts deny dont descend magic script magic output mangled map delete readonly = No dos filetimes = No dos filetime resolution = No fake directory create times = No [homes] comment = Home Directories browseable = No read only = No [printers] comment = All Printers browseable = No path = /usr/spool/samba print ok = Yes [datafiles] comment = datafiles path = /datafiles force user = enmac read only = No create mask = 0765 guest ok = Yes [wpclp03] comment = HP2600 path = /usr/spool/samba read only = No print ok = Yes share modes = No printer = wpclp03 [IPC$] comment = IPC Service (Samba Server) path = /tmp status = No guest ok = Yes -------------- next part -------------- [global] workgroup = TDMS netbios name = server string = Samba Server - {| rhn.system.hostname |} security = SHARE encrypt passwords = No password server root directory = / passwd program = /usr/bin/smbpasswd passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed* log level = 2 # log file = /var/log/samba/log.%m max log size = 50 read bmpx = Yes announce version = 4.2 max xmit = 65535 name resolve order = lmhosts host wins bcast max ttl = 14400 max wins ttl = 259200 keepalive = 0 lpq cache time = 10 printcap name = /etc/printcap os level = 95 preferred master = Yes domain master = No lock directory = /var/locks homedir map printing = bsd print command = lpr -r -P%p %s lpq command = lpq -P%p lprm command = lprm -P%p %j case sensitive = No # oplocks = No # strict locking = No dos filetimes = No [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No [datafiles] comment = datafiles path = /datafiles force user = enmac read only = No create mask = 0765 guest ok = Yes [wpclp03] comment = HP2600 path = /var/spool/samba read only = No printable = Yes printer name = wpclp03 share modes = No [IPC$] comment = IPC Service (Samba Server) path = /tmp guest ok = Yes
Jeremy Allison
2009-May-29 23:54 UTC
[Samba] App fails writing file but zero length file on Samba server
On Thu, May 28, 2009 at 08:57:26AM +0800, Colin Coe wrote:> Hi all > > I've googled but not found any thing on the problem I'm having. > > I'm contracting with a utilities company that uses General Electric's > ENMAC software. This runs on RHEL4 and makes use of Samba but it only > works with Samba 1.9.18p10 compiled with this patch: > --- > diff -Naur samba-1.9.18p10/source/includes.h > samba-1.9.18p10_good/source/includes.h > --- samba-1.9.18p10/source/includes.h 1998-08-20 07:41:46.000000000 +0800 > +++ samba-1.9.18p10_good/source/includes.h 2008-01-11 > 10:39:49.000000000 +0900 > @@ -1176,7 +1177,7 @@ > #include <sys/ipc.h> > #include <sys/sem.h> > #include <sys/shm.h> > -#ifdef NO_SEMUN > +#ifdef _SEM_SEMUN_UNDEFINED > union semun { > int val; > struct semid_ds *buf; > --- > > As I'm trying to streamline the building of these servers, I thought > I'd try upgrading Samba to a reasonably current version. I'm trying > with latest version of Samba shipped by RedHat (3.0.33-0.17.el4). > > When an edit is made and then saved in the application, the > application responds with 'Failed to open file for writing' and on the > Samba server a zero length file of the correct name appears. This > works just fine with the patched Samba 1.9.18p10. > > The smb.conf files are attached. > > Does anyone have any ideas on how to make this work without patching Samba?Wow, it's a long time since I've seen anyone using such a vintage version of Samba. 1.9.18p10 was definately a popular build :-). Can you try using the latest version of Samba, 3.3.4, and see if the problem is reproducible ? If so, we'll ask you to open a bug report and get more data. Thanks, Jeremy.