Bug 497633 - Samba creates all files in share as user root
Samba creates all files in share as user root
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
All Linux
low Severity urgent
: ---
: ---
Assigned To: Simo Sorce
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-04-25 07:35 EDT by Joost Ruijsch
Modified: 2009-07-14 12:32 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-14 12:32:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joost Ruijsch 2009-04-25 07:35:08 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):

How reproducible:

Steps to Reproduce:
1. Create file in share using smb client and check ownership
Actual results:
$ ls -l

-rwxrw-r-- 1 root  john       0 2009-04-25 13:04 New Text Document.txt

Expected results:
$ ls -l

-rwxrw-r-- 1 john  john       0 2009-04-25 13:04 New Text Document.txt

Additional info:
Problem started this morning since new update was installed by yum. Previous versions did not have this problem.
Comment 1 Guenther Deschner 2009-04-27 09:16:23 EDT
Can you please post your full smb.conf file ?
Comment 2 Joost Ruijsch 2009-04-27 10:34:20 EDT
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 =
 security = share
 encrypt passwords = yes
 smb passwd file = /etc/smbpasswd

 comment = Joost Home
 path = /home/joost/smb
 writable = yes
 user = joost
Comment 3 Joost Ruijsch 2009-04-27 11:09:11 EDT
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 ( 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 ( 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..
Comment 4 Bug Zapper 2009-06-09 23:41:00 EDT
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: 
Comment 5 Bug Zapper 2009-07-14 12:32:26 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.