BUG REPORT : SWAT on Samba 2.0.7

Conor Daly conor.daly at oceanfree.net
Fri May 5 21:50:16 GMT 2000


Hi,

Nice little bug for you...

SWAT is not implementing file permissions properly when editing smb.conf.  an ls -l of my smb.conf looks like this:

-rw-rw-r--    1 root     root          804 May  5 21:45 smb.conf

Note the Owner / Group and 664 permission

If I telnet to the server, log on as an ordinary user and do a "vi /etc/smb.conf" I get the file opened "Read-Only" and can't do any edits.  however, if i do a http://192.168.1.1:901 to run SWAT from the same client PC and log on as an ordinary user, I can edit away to my heart's content.  Among other things I was able to do was to add a subnet to the hosts allow line in the [globals] section (this is not in my sample) and to add / as a share.  It showed up beautifully in Win98 Network Neighbourhood.  I wasn't able to edit anything but I'm sure I could have if i'd set my mind to it.  

A quick workaround is to do a "chmod 644 /etc/smb.conf" but a fix to handle the permissions correctly would be nicer wouldn't you say! ;-)

My smb.conf (have a look at the "root" share):
# Samba config file created using SWAT
# from Albatros.cod.ie (192.168.1.2)
# Date: 2000/05/05 21:45:52

# Global parameters
[global]
 workgroup = MIDDLEEARTH
 netbios name = HOBBITON
 server string = %L server running Samba %v
 username map = /etc/smbusers
 log file = /var/log/samba/log.%m.log
 max log size = 1000
 socket options = TCP_NODELAY IPTOS_LOWDELAY
 os level = 34
 preferred master = Yes
 domain master = Yes
 wins support = Yes
 hosts allow = 192.168.1. 127.

[homes]
 comment = %U's (Windows) home directories
 path = %H/Win98
 writeable = Yes
 browseable = No

[Public]
 comment = Public access directory (%U logged on)
 path = /home/public
 writeable = Yes

[root]
 comment = Root share I shouldn't have been allowed create as an ordinary user
 path = /
 writeable = Yes
 guest ok = Yes

################ end of smb.conf #####################

Running swat from a Win98 PC (192.168.1.2) as client on my home LAN by doing http://192.168.1.1:901 to the Linux Host

Using Samba 2.0.7 from the RedHat samba-2.0.7-20000425.i386.rpm on RedHat 6.2

Got some Pizza but ate it myself (a kinda local contribution to support the reporting of bugs in Samba!!). ;^(

PS.  Reading the "Using Samba" book, it mentions how "Magic Scripts" are not to be trusted or something like that.  They look like just what I need, Is there any more detail out there on the use of Magic Scripts, are they a fully supported element of Samba, will the boss let me use them, what's your favourite colour?...

Conor Daly

------------------------------------------
conor.daly at oceanfree.net

ph  +353 1 8326146
fax  +353 1 8326146
------------------------------------------
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba mailing list