[Samba] Can see directories however no files [SOLVED]

Samba samba at hoogerdijk.org
Fri Jan 13 12:13:37 MST 2012


Hello Moray,

Thanks for this tip. I works like a charm!

I had disabled SELinux on the box, and didn't suspect SELinux to be 
causing the problem (as I disabled it from the beginning). 

I did the following to solve it:

semanage fcontext -a -t samba_share_t "/home/files(/.*)?" 

followed by:

restorecon -R -v /home/files/ 

Kind regards,

Raymond




From:   Moray Henderson <Moray.Henderson at ict-software.org>
To:     <samba at msx4ever.xs4all.nl>, <samba at lists.samba.org>
Date:   13-01-2012 11:51
Subject:        RE: [Samba] Can see directories however no files



> From: Samba [mailto:samba at hoogerdijk.org]
> Sent: 12 January 2012 14:25
> I am setting up a new server with Centos 6.2, EXT4 file system and
> Samba
> 3.5.10-114 and have made several shares. When I connect from an XP or
> Windows 7 PC I can access the shares and I can see the directories
> which
> are in the share, but not the files. I am busy for two weeks now to
> figure
> 
> out why, but cannot find any leads. I checked the permissions on the
> share
> 
> and on the files and they look OK:
> 
> Directory "files" (this directory is shared):
> drwxrwx---. 17 raymond  users     4096 Dec  5 14:21 files
> 
> Then the rights from a file which is in the share (I cannot see the
> file
> from XP or Windows 7):
> -rwxrwx---.  1 raymond users 9715984 May 19  2010 guideDUT.pdf

I came across something like this myself yesterday - it was an SELinux
issue.  Use "ls -Z" to see the security context of the files.  You may 
need
either to choose a suitable context, or set one of the Samba SELinux 
options
(see "man samba_selinux"). 



Moray.
"To err is human; to purr, feline."







More information about the samba mailing list