LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   samba shares show 0 files in every folder??? (https://www.linuxquestions.org/questions/linux-software-2/samba-shares-show-0-files-in-every-folder-580206/)

alabamaman 08-27-2007 12:51 PM

samba shares show 0 files in every folder???
 
okay i've been at this for a week and i've tried my best to read/search to find the answer so i didn't have to post -- but no luck.

i have this machine running fedora, 2 fileservers running win server2k3, a modded xbox (XBMC -- i think its mandrake based?) and 2 XP machines.

i'm trying to set up a simple share for all of these machines to be able to see the one shared directory and just be able to access the files inside. shouldn't be a big deal right? well for some reason i can browse all of the folders but each one shows that the folder is empty.

here's my info:

distro: FC6 -- kernel 6.22.2-42
share: samba -- smb.conf configured via SWAT
ip info: dhcp on all machines, no wins server

here's my smb.conf
Code:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2007/08/24 11:09:10

[global]
        workgroup = CARSON
        server string = LinuxBox
        security = SHARE
        username map = /etc/samba/smbusers
        encrypt passwords = No
        guest account = xbox
        log file = /var/log/samba/%m.log
        max log size = 50
        acl compatibility = winnt
        server signing = auto
        load printers = No
        preferred master = No
        local master = No
        domain master = No
        dns proxy = No
        ldap ssl = no
        guest ok = Yes
        hosts allow = ALL
        hosts deny = 10.20.20.

[homes]
        comment = Home Directories
        read only = No
        printable = No

[media]
        comment = movies on dustyfedora
        path = /media
        valid users = xbox, remoteadmin, root
        admin users = remoteadmin, RemoteAdmin
        read only = No
        writeable = Yes

if anybody can give me a heads up as to any other info i should post or anything i should check i'd be greatly appreciative. i'm sure its something small and stupid so thanks in advance for your patience. i'm pulling my hair out over here.

Peacedog 08-27-2007 06:51 PM

Just curious, what are the permissions on /media?
Good luck. ;-)

alabamaman 08-27-2007 09:34 PM

Code:

[root@dustyfedora media]# ls -ld
drwxrwxrwx 3 root root 4096 Aug 21 16:32 .

thanks for the reply, any advice is appreciated

Gryyphyn 08-27-2007 11:46 PM

Samba vars
 
Quote:

Originally Posted by alabamaman (Post 2872842)
Code:

[root@dustyfedora media]# ls -ld
drwxrwxrwx 3 root root 4096 Aug 21 16:32 .

thanks for the reply, any advice is appreciated

Permissions look good on /media, but my concern is the missing flag: browseable = Yes. Without this flag, in my experience, you'll be able to see the share because it's broadcasted and declared but you won't actually be able to browse it. This could explain the problem you're having. I use swat to configure but I always go in to the config and clean up/double check my options. If you're bent on using it make sure that each time you configure something with it, be it share or global, that you're on the advanced mode. Otherwise you miss options, browseable being one.

In swat go to the share tab, select your share and click advanced (if you weren't doing this before), then click select share. This should open up more of the options that are off by default. So long as you don't change any you never see them in the config file. Browsable should be near the bottom. Change the value to Yes (or add browseable = Yes to your config file at the bottom of the appropriate share) and restart the daemons (killall -HUP smbd / nmbd).

Hope this fixes it for you.

Gryyphyn

pappy_mcfae 08-28-2007 03:54 AM

Quote:

Originally Posted by alabamaman (Post 2872373)
if anybody can give me a heads up as to any other info i should post or anything i should check i'd be greatly appreciative. i'm sure its something small and stupid so thanks in advance for your patience. i'm pulling my hair out over here.

Check to make sure your hosts file has all the IP addresses and names of all the machines on your LAN. Samba can get really cranky without that file. I don't know fedora, so I don't know where that file hides, or what it is called. Under slackware, it's /etc/hosts. If the name is the same under fedora, make sure that file is up to date with all the current IP addresses in your system. My experience is that file can mean the difference between functional samba, and anything but.

Blessed be!
Pappy

netman4ttm 08-28-2007 09:18 AM

OK here is the obvious stuff.
I will use xbox as the user.
First, create the user xbox in Fedora.
Then smbpasswd -a xbox, to create xbox in SAMBA.
In /media share
Commment out vaild users and admin users.
Add browseable = yes
The following is for a huge server so you may want to cut back buffers and cache:

[global]
workgroup = CARSON
server string = LinuxBox
security = user
interfaces = 192.168.10.0/24 192.168.1.0/24 127.0.0.1/8 (make sure to change these to the ip network you are using but also make sure to keep 127. )
bind interfaces only = Yes
encrypt passwords = Yes
min password length = 1
unix password sync = Yes
read size = 8192
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=32768 SO_RCVBUF=32768
load printers = No
strip dot = Yes
os level = 99
preferred master = Yes
domain master = Yes
writeable = Yes
create mask = 0777
directory mask = 0777
force directory security mode = 0777
inherit permissions = Yes
hosts allow = localhost, 192.168.10.0/255.255.255.0, 192.168.1.0/255.255.255.0
max connections = 180
write cache size = 262144
short preserve case = No
oplocks = No
dos filetimes = Yes
dos filetime resolution = Yes
fake directory create times = Yes
veto oplock files = /*.cdx /*.dbf/
force user = root
force group = wheel

This system is bsd so force group will be whatever root's group is on Fedora. The security is non-existent YOU ARE WARNED to not connect this box to a network you do not trust!!!

alabamaman 08-28-2007 10:20 AM

Quote:

Originally Posted by netman4ttm (Post 2873376)
This system is bsd so force group will be whatever root's group is on Fedora. The security is non-existent YOU ARE WARNED to not connect this box to a network you do not trust!!!

thank you! this is exactly what i was looking for. everything is locked down within my house and i even have a static inside (10.) ip from my isp so i could care less about security. the thing is, this still doesn't work. i'm having the same problem and i'm about to take up smoking because ASDF@!!HP:#H$W:H@P#H%@GH%@$%

alabamaman 08-28-2007 10:27 AM

Quote:

Originally Posted by Gryyphyn (Post 2872919)
Permissions look good on /media, but my concern is the missing flag: browseable = Yes. Without this flag, in my experience, you'll be able to see the share because it's broadcasted and declared but you won't actually be able to browse it. This could explain the problem you're having. I use swat to configure but I always go in to the config and clean up/double check my options. If you're bent on using it make sure that each time you configure something with it, be it share or global, that you're on the advanced mode. Otherwise you miss options, browseable being one.

In swat go to the share tab, select your share and click advanced (if you weren't doing this before), then click select share. This should open up more of the options that are off by default. So long as you don't change any you never see them in the config file. Browsable should be near the bottom. Change the value to Yes (or add browseable = Yes to your config file at the bottom of the appropriate share) and restart the daemons (killall -HUP smbd / nmbd).

Hope this fixes it for you.

Gryyphyn

i should have clarified before -- i only used SWAT as a last resort type of option. nothing else was working and i heard about it so i figured "that seems pretty dummy proof, let's go with it." evidently not. i added the line and even adapted my config to resemble the one in the latter response, and i'm still stuck with the same problem...

this has to be the dumbest little thing i'm leaving out and its making me very angry!!!!!

thanks for your help guys, i really do appreciate it. if it weren't for this post i'd probably just be buying a new hdd to put in my windows box instead of making this share work.

alabamaman 08-28-2007 10:36 AM

also here's this just in case -- i know how to fix the 'unix password sync' problem which i'll do now, but the rest i'm guessing i need to add lines i don't know about...

Code:

[root@dustyfedora ~]# testparm
Load smb config files from /etc/samba/smb.conf
Unknown parameter encountered: "min password length"
Ignoring unknown parameter "min password length"
Unknown parameter encountered: "strip dot"
Ignoring unknown parameter "strip dot"
WARNING: The "write cache size" option is deprecated
Processing section "[==Movies==]"
Loaded services file OK.
ERROR: the 'unix password sync' parameter is set and the 'passwd program' () cannot be executed (error was No such file or directory).
ERROR: the 'passwd program' () requires a '%u' parameter.
Invalid combination of parameters for service ==Movies==.                        Level II oplocks can only be set if oplocks are also set.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

also for some reason i can't open up anything i need to open within gnome -- ex. i click on system>>administrator>>users and groups the root login pops up, then nothing happens. same with samba options and my firewall settings....uhhhhh????????? man this is wearing me out

dreamcarrior 08-28-2007 07:18 PM

I am running FC6 2.6.20-1.2952.fc6, and my Samba share is working perfectly. Below is my configuration. What I did besides this is
create user accounts for the windows clients and match their password so that while the windows clients are trying to access the samba share, they do not need to supply passwords. From the results of your "testparm", I suggest you remove those parameters that cause errors. Do you have your SElinux on? My experience with SElinux was not pleasant. Change it to permissive mode will make life easier. Then I do not think you have firewall problem since you mentioned that the folders are shown on the network but no contents. Just make sure all contents in the folder have permission mode of 777 since you claim that you have no threat. NOW what concerns me is you also mentioned you have problem with gnome. This makes me wonder how old your hardware is. Have you checked your hard drive consistency? Try to use fsck to check your hard drives. I think your gnome session is a bit weird, either from the results of corrupt files, libraries, or even partially damaged memory.

Good luck!



[global]
workgroup = DCGROUP
server string = MEDIA
security = user
local master = yes
log file = /var/log/samba/%m.log
max log size = 50
load printers = No
dns proxy = No
wins support = Yes
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /usr/spool/samba
printable = Yes
browseable = No

[tmp]
comment = Temporary file space
path = /tmp
read only = No
guest ok = Yes

[Share-Programs]
comment = Share-Programs
path = /share/share/Share-Programs
write list = @family

[Documents]
comment = Documents
path = /share/share/Data
write list = @family

[FIX160GB]
comment = FIX160GB
path = /share/FIX160G
write list = @family
guest ok = Yes

[Music]
comment = Music for Friends
path = /share/share/Music
write list = @family
guest ok = Yes

[Video]
comment = Video for Friends
path = /share/share/Videos
write list = @family
guest ok = Yes

[Shared-Space]
comment = Place for everyone
path = "/share/share/Share Space"
read only = No
guest ok = Yes

[Web]
comment = Chen's Paradise Website
path = /var/www/html
write list = @family
guest ok = Yes

alabamaman 08-29-2007 12:50 PM

Quote:

Originally Posted by dreamcarrior (Post 2873989)
Do you have your SElinux on? My experience with SElinux was not pleasant. Change it to permissive mode will make life easier.

SElinux was the problem, thanks everyone for the help, everything is working smoothly now w00t!!

many many thanks to all for your suggestions.


All times are GMT -5. The time now is 05:02 AM.