Bug 135946
| Summary: | Cannot write to /etc/samba/smb.conf | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Bob Gustafson <bobgus> |
| Component: | system-config-samba | Assignee: | Nils Philippsen <nphilipp> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-10-20 01:13:13 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 130887 | ||
|
Description
Bob Gustafson
2004-10-15 20:38:14 UTC
Can you please run system-config-samba from the command line? It should spit ot a python traceback, please copy it here. [user1@hoho2 ~]$ su
Password:
[root@hoho2 user1]# system-config-samba
Traceback (most recent call last):
File "/usr/share/system-config-samba/system-config-samba.py", line
41, in ?
mainWindow.MainWindow(debug_flag)
File "/usr/share/system-config-samba/mainWindow.py", line 75, in
__init__
self.samba_data = sambaParser.SambaParser(self)
File "/usr/share/system-config-samba/sambaParser.py", line 40, in
__init__
self.parseFile()
File "/usr/share/system-config-samba/sambaParser.py", line 74, in
parseFile
token = self.createToken(line)
File "/usr/share/system-config-samba/sambaParser.py", line 146, in
createToken token =
sambaToken.SambaToken(sambaToken.SambaToken.SAMBA_TOKEN_KEYVAL, (name,
value), self.parent)
File "/usr/share/system-config-samba/sambaToken.py", line 36, in
__init__
raise AttributeError, value
AttributeError: ('readonly', 'yes')
[root@hoho2 user1]#
This indicates a wrong option in your /etc/smb.conf. According the the smb.conf(5) man page it is "read only", not "readonly" -- could you check your /etc/smb.conf please? # From http://www.poulpetersen.dk/linux/uklinshr.htm # cdrom setup [cdrom] comment = Samba Server CDROM browseable = yes writeable = no readonly = yes printable = no public = yes only guest = no path = /mnt/cdrom Changing the readonly to 'read only' gives much better results. Before it was a blank dialog box. Now there are a few lines showing shares, etc. (Including the cdrom drive..) Thanks much for the pointer. (maybe smb.conf parse errors should show in the dialog box?) Works for me Reopening this under a slightly different title ;-). Hmm, I am still getting the dialog box
Cannot write to /etc/samba/smb.conf Program will now exit.
I open a 'preferences' dialog and get the above message when I exit,
no matter whether I change anything or not.
Running from the command line, this is what I get:
[root@hoho2 samba]# system-config-samba
/usr/share/system-config-samba/mainWindow.py:113: DeprecationWarning:
use gtk.UIManager
item_fac = gtk.ItemFactory(gtk.MenuBar, "<main>", accel_group)
/usr/share/system-config-samba/mainWindow.py:138: DeprecationWarning:
button = self.toolbar.insert_stock('gtk-add', _("Add a samba
share"), None, self.onNewButtonClicked, None, 0)
/usr/share/system-config-samba/mainWindow.py:143: DeprecationWarning:
self.properties_button = self.toolbar.insert_stock('gtk-properties',
_("Edit the properties of the selected directory"), None,
self.onPropertiesButtonClicked, None, 1)
/usr/share/system-config-samba/mainWindow.py:148: DeprecationWarning:
self.delete_button = self.toolbar.insert_stock('gtk-delete',
_("Delete the selected directory"), None, self.onDeleteButtonClicked,
None, 2)
/usr/share/system-config-samba/mainWindow.py:153: DeprecationWarning:
self.toolbar.insert_stock('gtk-help', _("View help"), None,
self.onHelpClicked, None, 3)
Traceback (most recent call last):
File "/usr/share/system-config-samba/shareWindow.py", line 537, in
onOkEditButtonClicked
self.samba_data.writeFile()
File "/usr/share/system-config-samba/sambaParser.py", line 173, in
writeFile
raise RuntimeError, (_("Cannot write to %s. Program will now
exit." % path))
RuntimeError: Cannot write to /etc/samba/smb.conf. Program will now exit.
[root@hoho2 samba]#
Ahh I got the culprit now, changed title back. Should be fixed in 1.2.21-1. Grab them from http://people.redhat.com/nphilipp/BETA/system-config-samba/ until they hit the mirrors. Seems to work I did rpm -i system..src.rpm rpm -i system..noarch.rpm cd /usr/src/redhat/SPECS rpmbuild -bi system..src.rpm 2>&1 system-config.out And then added a 'share' and then deleted it. Seemed to work OK. Thanks much Works for me You shouldn't have needed to rebuild the source RPM ;-), but anyway good to hear that it works. |