Bug 4074 - Sharing only shows files created via smb, not filesystem
Summary: Sharing only shows files created via smb, not filesystem
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.23a
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-31 16:36 UTC by Tim Schmelter
Modified: 2006-09-03 09:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Schmelter 2006-08-31 16:36:54 UTC
Hope this isn't addressed somewhere else, but Google  & bug searches haven't helped.

My very basic Samba install includes a share "foo" that is supposed to be a publicly accessible fileshare area. The permissions are wide open for this test. The behavior I'm seeing: If I use smbclient (or mount the share from my Windows box) to create a file, I can see the file in both the filesystem and the samba client.

However, if I create a file in the share directly on the filesystem (e.g., using command line) the file is not visible to the samba share, even though it's visible to the world via the filesystem.

If I create a *directory* in the share directly on the filesystem, the directory is visible and writeable to both the samba share and the filesystem.

SAMBA VERSION: 3.0.23a-1.fc5.1

[root@yoda tmp]# uname -a
Linux yoda.powered.com 2.6.17-1.2174_FC5 #1 Tue Aug 8 15:30:55 EDT 2006 i686 athlon i386 GNU/Linux

Transcript to demonstrate issue:

[root@yoda tmp]# ls -l
total 24
-rw-r--r--  1 root root  142 Aug 31 16:18 file1.txt
[root@yoda tmp]# ls -la /foo
total 16
drwxrwxrwt  2 root root 4096 Aug 31 16:21 ./
drwxr-xr-x 25 root root 4096 Aug 31 16:16 ../
[root@yoda tmp]# cat /etc/samba/smb.conf
# vim: set ts=4 sw=4 sts=4 et
[global]
    workgroup = WORKGROUP
    server string = Yoda Samba Server
    log level = 0

    hosts allow = 127., 192.168.
    ldap ssl = no
    load printers = No
    log file = /var/log/samba/%m.log
    mangled names = no
    max log size = 50
    msdfs root = no
    printing = bsd
    security = user

[foo]
    comment = Foo
    path = /foo
    read only = no
    public = yes

[root@yoda tmp]# smbclient //localhost/foo
Password:
Anonymous login successful
Domain=[POWERED] OS=[Unix] Server=[Samba 3.0.23a-1.fc5.1]
smb: \> put file1.txt
putting file file1.txt as \file1.txt (1420000.0 kb/s) (average inf kb/s)
smb: \> quit
[root@yoda tmp]# ls -la /foo
total 24
drwxrwxrwt  2 root   root   4096 Aug 31 16:23 ./
drwxr-xr-x 25 root   root   4096 Aug 31 16:16 ../
-rwxr--r--  1 nobody nobody  142 Aug 31 16:23 file1.txt*
[root@yoda tmp]# cp /foo/file1.txt /foo/file2.txt
[root@yoda tmp]# smbclient //localhost/foo
Password:
Anonymous login successful
Domain=[POWERED] OS=[Unix] Server=[Samba 3.0.23a-1.fc5.1]
smb: \> dir
  .                                   D        0  Thu Aug 31 16:23:27 2006
  ..                                  D        0  Thu Aug 31 16:16:23 2006
  file1.txt                           A      142  Thu Aug 31 16:23:09 2006

                45682 blocks of size 4194304. 21506 blocks available
smb: \> quit
[root@yoda tmp]# # ARGH!
[root@yoda tmp]# mkdir /foo/testdir-from-filesystem
[root@yoda tmp]# smbclient //localhost/foo
Password:
Anonymous login successful
Domain=[POWERED] OS=[Unix] Server=[Samba 3.0.23a-1.fc5.1]
smb: \> dir
  .                                   D        0  Thu Aug 31 16:31:04 2006
  ..                                  D        0  Thu Aug 31 16:16:23 2006
  testdir-from-filesystem             D        0  Thu Aug 31 16:31:04 2006
  file1.txt                           A      142  Thu Aug 31 16:23:09 2006
smb: \> quit
[root@yoda tmp]# ls -la /foo
total 40
drwxrwxrwt  3 root   root   4096 Aug 31 16:31 ./
drwxr-xr-x 25 root   root   4096 Aug 31 16:16 ../
-rwxr--r--  1 nobody nobody  142 Aug 31 16:23 file1.txt*
-rwxr--r--  1 root   root    142 Aug 31 16:23 file2.txt*
drwxr-xr-x  2 root   root   4096 Aug 31 16:31 testdir-from-filesystem/
Comment 1 Tim Schmelter 2006-09-01 07:14:38 UTC
Sorry, all, I realized that when I sanitized my smb.conf to post, I didn't also sanitize the output of smbclient. So since the cat's out of the bag anyway, the workgroup in smb.conf is, in fact, "POWERED", as reported by the output of smbclient. --Tim
Comment 2 Volker Lendecke 2006-09-03 03:39:19 UTC
Can you try to disable selinux?

Volker
Comment 3 Tim Schmelter 2006-09-03 09:41:50 UTC
That did it! Thanks so much for the suggestion. I feel like a complete bonehead, but that's nothing unusual. If only I had read:
  http://www.mjmwired.net/resources/mjm-fedora-fc5.html#samba

Thanks very much. I'm marking this bug as INVALID.