Bug 120342 - list files in a mount samba directory
list files in a mount samba directory
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
rawhide
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jay Fenlason
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-07 17:05 EDT by José Salgado
Modified: 2014-08-31 19:26 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-21 13:26:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description José Salgado 2004-04-07 17:05:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312

Description of problem:
I was using Fedora Core 1 without a problem but when I install the beta
2 I have a issue with samba. I'm trying to connecto to our file sever
(Win NT) and all I got is:

[root@iglu root]# mount /mnt/saladelfrio/
[root@iglu root]# ls -la /mnt/saladelfrio
ls: /mnt/saladelfrio: `slot' incorrecto

and the tail -f /var/log/messages
Apr  6 18:54:18 iglu kernel: SELinux: initialized (dev , type smbfs),
not configured for labeling

The fstab line is right or almost work with Fedora Core 1

Version-Release number of selected component (if applicable):
samba-client-3.0.3-1.pre1

How reproducible:
Always

Steps to Reproduce:
1. Share a folder over SMB in a remote computer on your network
2. Mount it
3. Go to the mounted directory and make ls -la
    

Actual Results:  Shows me the message:
[root@iglu root]# ls -la /mnt/saladelfrio
ls: /mnt/saladelfrio: `slot' incorrecto

incorrecto is spanish and means "not right"

Expected Results:  Well, list the files.

Additional info:

It worked in FC1 and now, in beta 2 I cant list mounted smb partitions
doesn't matter if is a NT server o Linux server
Comment 1 Jay Fenlason 2004-04-07 17:20:21 EDT
This would be a problem with the Linux kernel smbfs filesystem module,
and not a Samba problem.  I'm reassigning this to the kernel maintainers.

You should try the Linux cifs filesystem module instead.  It's more
recent than smbfs and has active maintainers.  smbfs is likely to be
removed in a version or two.
Comment 2 José Salgado 2004-04-07 17:44:36 EDT
Well, then I had:

[root@iglu root]# /sbin/mount.cifs //WWW/www /mnt/saladelfrio -o
user=jose,password=baixantperlafontdelgat
mount error 5 = Input/output error
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
Comment 3 Arjan van de Ven 2004-04-08 07:03:59 EDT
actually this is an selinux issue with the winnt share not being
configured for labling
Comment 4 Daniel Walsh 2004-04-08 08:55:54 EDT
Could you submit the AVC messages within the /var/log/messages.

I will add a genfs_context for cifs.

Dan

Comment 5 José Salgado 2004-04-09 08:58:24 EDT
Using CIFS The var/log/messages is:

Apr  9 15:00:39 iglu kernel:  CIFS VFS: cifs_mount failed w/return
code = -5

Using SMBFS the message is:

Apr  9 15:01:49 iglu kernel: smbfs: Unrecognized mount option noexec
Apr  9 15:01:49 iglu kernel: smb_lookup: find //.Trash-friopolar
failed, error=-57
Apr  9 15:01:49 iglu kernel: smb_proc_readdir_long: error=-57, breaking
 
Comment 6 Daniel Walsh 2004-04-12 13:46:20 EDT
Try with latest policy -1.11.1-1
Comment 7 José Salgado 2004-04-12 15:43:48 EDT
I've got all the system updated via up2date and apt-get and the
lastest policy package is:

[root@iglu memstick]# rpm -q policy
policy-1.10.2-5

Comment 8 Daniel Walsh 2004-04-12 16:01:44 EDT
Yes add 

ftp://people.redhat.com/dwalsh/SELinux/Fedora 
to /etc/yum.conf and you will get newere policy files.

That way you don't have to wait 24 hours.
Comment 9 Hans Engelen 2004-04-13 00:47:29 EDT
Itś not a policy problem imho. Running on a custom kernel right now
with SELINUX disabled (1. the avc messages are driving me nuts and
making it insanely hard to read console output and logs, 2. easiest
way I could think of to make sure SELinux is not to blame at all) and
still getting an invalid slot error for this. Smbclient works fine btw
even in the official selinux enabled kernel (2.6.5.1-315) up2date gave me.

Considering CIFS is going berserk on me every time I try to use that
(one of the cifs daemons goes wild, becomes unkillable even with kill
-15 and keeps pumping stuff onto eth0 slowing the connection down
substantially with only a reboot as solution) this is kind of bugging
me a lot.
Comment 10 José Salgado 2004-04-13 13:36:24 EDT
With the new policy:

[root@iglu root]# rpm -q policy
policy-1.11.1-2

ar(uid=500)
Apr 13 19:36:57 iglu su(pam_unix)[2605]: session opened for user root
by friopolar(uid=500)

And the log is:
Apr 13 19:37:07 iglu kernel: smbfs: Unrecognized mount option noexec

With cifs
[root@iglu mnt]# /sbin/mount.cifs //WWW/www /mnt/saladelfrio -o
user=jose,password=lilolariiii
mount error 5 = Input/output error
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

And the log is:
Apr 13 19:40:04 iglu kernel:  CIFS VFS: cifs_mount failed w/return
code = -5


Comment 11 Hans Engelen 2004-04-15 08:00:12 EDT
Also, I am not convinced (in fact pretty sure that it isn't) that it
is a kernel problem either. Smbfs worked fine for me on a one of the
older kernels (although i had to recompile it with smbfs support) and
started giving this error too after a round of updates. Seems to me
something outside the kernel changed and broke it. Maybe mount itself
or somesuch ? As I stated before its defenitly not a policy issue
since I running a kernel without selinux in it.
Comment 12 Hans Engelen 2004-04-15 08:24:50 EDT
Following my own advise. I used an older version of 'smbmount' (one I
found in samba-client-3.0.0-15.i386.rpm, which was just the first
older samba 3.0 rpm I bumped into really) and this solved my problem.
No invalid slot message and doing an ls -al of /mnt/<samba_mount>
worked flawlessly.

I am not sure where and why it broke in the newer versions and why not
more people (outside fedora) seem to be having this problem. I did
websearches of all kinds to see if this problem was perhaps discussed
elsewhere on the web and found nothing on it anywhere (which seems odd
if samba-client is to blame, people with other distros should have
seen it too you would think).

Anyways, for now a quick qorkaround for me is :

Get smbmount from an older samba release (like from the rpm on the
FC2T1 of FC2T2 install cd, I used the one from FC2T1 I think) and call
that one instead of the one in /sbin when mounting SMBFS shares.
Comment 13 Arjan van de Ven 2004-04-15 08:28:58 EDT
back to samba again then :)
Comment 14 Alejandro Gonzalez Hernandez - Imoq 2004-04-17 19:12:02 EDT
bug #119766 is duplicate of this one, I think.
Comment 15 Fred Riss 2004-04-20 17:14:18 EDT
Same here. Tested with many Samba servers (Fedora, Win2000, Debian Sarge).
Comment 16 Alejandro Gonzalez Hernandez - Imoq 2004-04-25 11:26:47 EDT
This bug didn't get fixed with the latest samba, samba-3.0.3-2.pre2

FYI
Comment 17 dan ginsberg 2004-04-27 18:55:30 EDT
I've also seen smb-mount fail with the invalid slot error on all
fedora core2 versions of smbclient ( mount.cifs just hangs after you
supply your password ).

I see that Hans restored functionality by rolling back to
samba-client-3.0.0-15.  samba-client-3.0.2a-1  also works.
Comment 18 Alejandro Gonzalez Hernandez - Imoq 2004-04-30 13:50:27 EDT
Confirmed.

I installed samba-client-3.0.2a-1.1.i386.rpm and now I can mount smbfs
without any problem.
Comment 19 Hans Engelen 2004-05-04 15:55:57 EDT
Actually, I think the bug appeared in the 3.0.3pre versions. Tried 
multiple versions up to and including 3.0.2a and they all worked 
fine. Up2date and yum install 3.0.3pre2 though at the moment and 
thats the one it started giving the invalid slot message with. 
 
As for cifs, I can't even test cifs. Everytime I try a mount cifsd 
yanks my CPU to 100% and starts pumping god knows what onto my 
network link. Holding out for 2.6.6 which supposedly has a bunch of 
improvements on that matter. For the record though CIFS has NEVER 
worked for me. Not in FC2T1 or any of the upgrades since. I would try 
narrowing it down but every time cifsd goes nuts it also ends up 
being unkillable to boot so I didn't bother with it. 
Comment 20 José Salgado 2004-05-04 16:04:57 EDT
The Version 3.0.3-4 doesn't work at all. Maybe it's time to think in
dowgrading samba.
Comment 21 Alejandro Gonzalez Hernandez - Imoq 2004-05-09 01:57:01 EDT
Finally!

samba-3.0.3-5.i386.rpm (from FC2, probably final release) works!

Update to it at once and close this nasty bug ;)
Comment 22 dan ginsberg 2004-05-14 18:42:05 EDT
Verifying that this package works for me as well.
Comment 23 José Salgado 2004-05-14 19:42:18 EDT
It works for me too (almost in a NT file server).
Comment 24 Jeremy Goodwin 2004-05-16 12:32:38 EDT
With the new version of samba (3.0.3-5), mount -t smbfs will now work,
but mount.cifs still reports

mount error 5 = Input/output error
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
Comment 25 Greig McGill 2004-06-03 19:36:23 EDT
I am still experiencing this fault.
It's characterised for me by what looks like unreadable permissions on
the mounted directory, as follows:

[root@baldir root]# mount -t smbfs -o
username=greig,uid=1000,gid=1000,domain=ITPARTNERS //10.7.0.15/data
/mnt/tmp
Password: <typed>
[root@baldir root]# ls -la /mnt
total 32
drwxr-xr-x   8 root root  4096 Jun  4 10:55 .
drwxr-xr-x  21 root root  4096 Jun  4 10:40 ..
?---------   ? ?    ?        ?            ? tmp

This happens no matter what parameters I use for -o (admin user, leave
out uid/gid/domain) and whether I name the server or use the IP address.
Comment 26 Greig McGill 2004-06-03 19:44:28 EDT
Just a quick note - running FC2 with all current updates applied.

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