Red Hat Bugzilla – Bug 497633
Samba creates all files in share as user root
Last modified: 2009-07-14 12:32:26 EDT
Description of problem:
Samba creates all files in share as user root!
Even when [share] is defined with
user = john
force user = john
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create file in share using smb client and check ownership
$ ls -l
-rwxrw-r-- 1 root john 0 2009-04-25 13:04 New Text Document.txt
$ ls -l
-rwxrw-r-- 1 john john 0 2009-04-25 13:04 New Text Document.txt
Problem started this morning since new update was installed by yum. Previous versions did not have this problem.
Can you please post your full smb.conf file ?
I tried to reduce my smb.conf to the bare minimum, but even with the one below the problem persists. I have checked using two XP client machines.
workgroup = WORKGROUP
netbios name = SAMBA
server string = Samba Server
bind interfaces only = true
interfaces = 10.5.0.1 127.0.0.1
security = share
encrypt passwords = yes
smb passwd file = /etc/smbpasswd
comment = Joost Home
path = /home/joost/smb
writable = yes
user = joost
I just discovered something in log.smbd:
[2009/04/27 16:25:36, 0] smbd/server.c:main(1210)
smbd version 3.2.11-0.28.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[2009/04/27 16:25:42, 1] smbd/service.c:make_connection_snum(1194)
acerone (10.5.0.125) connect to service joost initially as user joost (uid=0, gid=500) (pid 1776)
[2009/04/27 16:30:07, 1] smbd/service.c:make_connection_snum(1194)
desktop (10.5.0.99) connect to service joost initially as user joost (uid=0, gid=500) (pid 1790)
According to this, user joost has same uid as root (uid=0).
/etc/passwd says I have uid 500.
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest
I tried commenting the "root =" line, and recreating /etc/smbpasswd, but still no luck.
If every smb user is suddenly promoted to root in this samba version, then any user could access and modify any file! Fortunately, its just my private server..
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '9'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 9's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 9 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.