[Samba] Incorrect permissions on mount despite correct options

Tim Starr starrte at clarkson.edu
Sun Apr 18 17:51:14 GMT 2004


Thought I'd follow up for the list's sake of what's happening. Ever 
since Michael informed me of the unix extensions being in effect I was 
able to solve the problem. I simply added "unix extensions = no" to my 
samba server's smb.conf. I feel very naive not knowing that these were 
in effect! I knew OF them and CIFS but I didn't know that they were on 
by default in the newer linux kernels and samba v3. The "unix 
extensions" option was well documented in the samba man page. However I 
would like to decide on a per client basis whether or not the unix 
extensions are used. I haven't been able to find anything on the web 
about how to do this except one message saying that it can be done. If 
anyone could point me in the right direction it would be greatly 
appreciated. Thanks much, hope someone else might find this useful.

												-Tim Starr

On Apr 18, 2004, at 3:48 AM, Tim Starr wrote:

> Michael,
> 	Thank you very much for at least that much information. I had not 
> looked at /etc/groups, doh. At least now I understand the source of 
> the problem. Hopefully from there I can make progress and perhaps with 
> some help from, as you called them, "the experts", I can disable this 
> feature and just have the volume inherit the permissions I want it to 
> have. Although I have to admit that is a nice feature and I'll have to 
> remember to take advantage of that. I feel really stupid not having 
> read more on this. I appreciate your information. I'll be reading much 
> more on that subject now! Thanks again and I hope to hear more 
> replies! Thanks again.
> 												- Tim Starr
>
> On Apr 18, 2004, at 3:20 AM, Michael Carmack wrote:
>
>> Tim Starr wrote:
>>> The problem was that it was/is being mounted under the following 
>>> permissions:
>>> tstarr at host:~/mount$ ls -l
>>> total 0
>>> drwxr-xr-x    1 501      dialout         0 Apr  7 20:39 Audio
>>> drwxrwxr-x    1 501      dialout         0 Apr  9 01:29 Desktop
>>> Now I have no user 501 on my system and no dialout group either. Odd.
>>
>> With Linux kernel 2.6.x and 2.4.25+, CIFS Unix extensions are in 
>> effect, allowing you to view and manipulate Unix-y things like 
>> symlinks and suid/sgid files using Samba.
>>
>> This also has the effect that the Unix UIDs and GIDs from the server 
>> get passed to the client.
>>
>> If you look on the server, you'll see that "501" is the numeric ID 
>> for the user that actually owns the file. And though you may not be 
>> aware of it, you *should* have a group called "dialout" on the Linux 
>> machine. (Look at /etc/group to confirm.) You'll notice that the 
>> numeric ID for the "dialout" group on your Linux machine maps to the 
>> numeric ID for the file's group on the server.
>>
>> [In case you were wondering what the point of this is, these changes 
>> make Samba play nicer with Unix machines. It makes it possible to 
>> replace something like NFS with Samba.]
>>
>> In the 2.4 series (as of 2.4.25), the Unix extensions are an optional 
>> configuration of the Linux kernel (i.e. you enable or disable this 
>> when building the kernel). I haven't looked at 2.6 yet, but I suspect 
>> it's also optional there. I don't know whether you can turn this 
>> behavior off or on after the kernel is built (using a mount option or 
>> a /proc setting or something), as I just started using it myself.
>>
>> FWIW, I've encountered a couple pitfalls myself. I think maybe there 
>> are still some issues to work out, so if Samba was previously doing 
>> everything you needed it to and you don't need the Unixy features, 
>> you might want to use a kernel that has these entensions disabled.
>>
>> (Just a slight caution: I haven't spent a lot of time using Samba, so 
>> I may be a little off with some of the things I just said. If so, 
>> hopefully the experts will set the record straight.)
>>
>> m.
>>
>
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba



More information about the samba mailing list