Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a fuse directory, and start it like this: ./myfuse /home/shared -o allow_other -o umask=022 -o nonempty -d

I can access it like this: ls -la /home/shared and it works fine.

Ok, turn that off for a second.

I have a samba-share defined as:

[root@cboardman-rh1 /]# testparm /etc/samba/smb.conf 
Load smb config files from /etc/samba/smb.conf 
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384) 
Processing section "[shared]" 
Loaded services file OK.
Server role: ROLE_STANDALONE 
Press enter to see a dump of your service definitions

[global]
            workgroup = MYWORKGROUP
            server string = Samba Server Version %v
            security = SHARE
            guest account = samba-user
            lanman auth = Yes
            client lanman auth = Yes
            log level = 5
            log file = /var/log/samba/log.%m
            max log size = 50
            wins support = Yes
[shared]
            comment = Sharing for everyone
            path = /home/shared
            guest only = Yes
            guest ok = Yes

Start up samba, and I can smbclient //cboardman-rh1/shared and connect no problems.

Here's the question: When I put the two together, I get trouble.

Specifically, when I do an ls from smbclient, I get

smb: \> ls
NT_STATUS_ACCESS_DENIED listing \*

                40960 blocks of size 512. 1 blocks available1

and fuse starts looking "/myfuse" instead of "/". ls /home/shared (hitting just fuse) has fuse looking for "/", as desired. Even adding a hack in my fuse code to translate "/myfuse" to "/", I get the same error code.

What is samba doing? I'm not seeing anything helpful in the logs. Any ideas?

I am on a RHEL server with SELinux and iptables disabled.

share|improve this question
up vote 3 down vote accepted

Step 1: Make sure it works with the given examples.

Step 2: Make sure your fuse code doesn't have any errors in it. Including very subtle ones that may get ignored by a simple ls on a mounted fuse directory alone.

share|improve this answer
3  
Awesome that you figured out what was wrong. Any chance you could be a bit more descriptive about what exactly the problem and solution were? – Darth Android Dec 13 '11 at 23:43
    
I don't know for caseyboardman, but I had the same problem and solved it after reading that answer here. In my case the samba server tried to get the attributes of something nonsensical like "/path/to/*" (with a verbatim asterisk). For that my getattr() raised a Python exception instead of returning -errno.ENOENT. After consulting the fuse's log file, I found that out very quickly and after correcting it, I got my fuse running via samba. – Alfe Aug 17 '12 at 22:50

I used a fuse based script and i solved a similar SMB problem adding -o allow_other,nonempty to fuse args.

I hope this solves your problem.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .