[Samba] Why my dir is not available ?

Rowland penny rpenny at samba.org
Sun Mar 13 09:36:01 UTC 2016


On 12/03/16 21:58, Pierre Couderc wrote:
>
>
> On 03/12/2016 08:24 PM, Rowland penny wrote:
>> On 12/03/16 18:28, Pierre Couderc wrote:
>>>
>>> On 03/12/2016 06:45 PM, Rowland penny wrote:
>>>> On 12/03/16 17:37, Pierre Couderc wrote:
>>>>> I have a samba server with a "var" share.
>>>>>
>>>>> I have 2 client computers  which mount this share  each one with 
>>>>> each (identical) /etc/fstab: :
>>>>>
>>>>> //192.168.163.1/var    /mnt/var        cifs 
>>>>> _netdev,username=xxxx,password=yyyy
>>>>>
>>>>> On a first client, I try to ls :
>>>>>
>>>>> ls /mnt/var/www
>>>>>
>>>>> and I get well the contents of www
>>>>>
>>>>> On the second client, I get :
>>>>> ls: cannot open directory /mnt/var/www: Permission denied
>>>>>
>>>>> How it is possible ? where to look for ?
>>>>>
>>>>> please note that, on the 2 clients, if I ls  :
>>>>>
>>>>> ls /mnt/var gives me correct results !!
>>>>>
>>>>>
>>>>> Thank you for any help.
>>>>>
>>>>> PC
>>>>>
>>>>
>>>> Hi, can you post a bit more info, how are you running Samba ?
>>>> Can you post the smb.conf files from the two machines ?
>>>>
>>>> Rowland
>>>>
>>>>
>>> Thank you.
>>> Yes, I can. And I will if it is useful.
>>
>> Yes
>>
>>> But will it help you to help me ?
>>
>> Possibly
>>
>>>
>>> I suppose have a correct samba configuration, as it works with many 
>>> customer computers (since years...).
>>> Ma question 1 : Is it possible that I am wrong on this point ?
>>
>> Well, until we see the smb.conf, we will not know.
> Thank you, please see below.
>>
>>>
>>> My question 2 :  what can make a difference between these 2 clients ?
>>> There is a small difference : the "good" customer is Ubuntu, and the 
>>> "bad" one is debian...
>>
>> There shouldn't, in principal, be any difference.
>>
>>>
>>> Please note that I cannot send the 2 smb.conf because I have only 
>>> one ! It is on the server.
>>> There are no smb.conf on the clients.
>>
>> Hang on, what are you running on the Unix clients, where do they auth 
>> to ?
> Mmm, I run standard cifs client, mounted in /etc/fstab as described 
> above, and without any smb.conf.
> Something like 
> https://wiki.samba.org/index.php/Mounting_samba_shares_from_a_unix_client
>
> ------------------------------------------
> Server smb.conf, I have removed a few more share, but all global 
> parameters are here :
>
> [global]
>
>    workgroup = TOL
>
>    server string = %h server (Samba, Ubuntu)
>    wins support = yes
>   dns proxy = no
>    interfaces = 127.0.0.0/8 eth0
>    log file = /var/log/samba/log.%m
>    max log size = 1000
>    syslog = 0
>    panic action = /usr/share/samba/panic-action %d
>    security = user
>    encrypt passwords = true
>    passdb backend = tdbsam
>    obey pam restrictions = yes
>    unix password sync = yes
>    passwd program = /usr/bin/passwd %u
>    passwd chat = *Enter\snew\s*\spassword:* %n\n 
> *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
>    pam password change = yes
>    map to guest = bad user
>    guest account = nous
>    usershare allow guests = yes
>
> #======================= Share Definitions =======================
>
> [printers]
> ....
>
> [print$]
> ....
>
> [var]
>     comment = var(V:)
>     writable = yes
>     public = yes
>     path = /var/
>     valid users = xxxx
>
>
>
>

OK, it appears that you are running a workgroup called 'TOL'. This means 
that all your users and groups need to exist on all machines and all 
passwords need to be in sync.

Have you checked that user 'xxxx' has the same password on all machines ?
Does the share actually get mounted on the machine you are denied access 
to ?
If it does get mounted, who actually owns the mounted share ?

Rowland



More information about the samba mailing list