Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a linux box that I'm using to mount a windows 7 share with samba or cifs. The mounting itself goes fine, but directories with more subdirs or files do not seem to have all the content they actually have.
For example, viewing my music folder shows only first 37 subdirs. The ls says "total 49", which is the correct amount, but the listing itself shows only 37 first in alphapetical order.
On the other hand, my wallpaper folder contains 122 files. Ls claims there is 41872 and displays only 70.
Adding the mount option noserverino increases the listed files or dirs, but it still does not show them all.
I've tried to enable debug printk level, but dmesg doesn't show anything interesting.
I've tried to change values in /proc/fs/cifs, but it does not seem to have any effect.
I've tried changing samba package. So far I've tested with 3.5.7, 3.5.2, 3.5.4 and now 3.5.8.
My distribution was yesterday slackware 13.1. Today I upgraded to 13.37 (with samba 3.5.8) but the problem persists.
I've tried with kernel versions 2.6.35.12, 2.6.38.2 and 2.6.37.6.
I hope there is someone with information about this.
Finally, here's some cifs info:
# cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 1.68
Features: fscache lanman
Active VFS Requests: 0
Servers:
1) Name: 10.0.0.3 Domain: WORKGROUP Uses: 1 OS: Windows 7 Ultimate 7600
NOS: Windows 7 Ultimate 6.1 Capability: 0x1e3fc
SMB session status: 1 TCP status: 1
Local Users To Server: 1 SecMode: 0x3 Req On Wire: 0
Shares:
1) \\blue\Data Mounts: 1 Type: NTFS DevInfo: 0x20 Attributes: 0xc700ff
PathComponentMax: 255 Status: 0x1 type: DISK
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386
Rep:
I usually go the other direction; Unix servers running samba serving Windows clients but the immediate thing that comes to mind are ACLs. Have you verified on the Win7 machine that the everyone group have at least read permissions? When you mount the share from Linux are you defining the umask and matching UID?
On win7 machine the group "Users" has 'Read & execute', "List folder" and "Read" permissions. The username (my main user) I'm using to log in with cifs is also in group "Administrators", which has all permissions. The permissions on the invisible directories are inherited from the drive's root.
On the share "everyone" has read permissions and I've tried to add my main user with all the permissions.
I also can access the invisible directories by cd'ing to them and can then display their contents correctly.
Using uid mount option does not make any difference. I'm currently mounting the Windows share by saying:
mount.cifs //blue/Data .mnt_blue_data/ -o username=myuser
Ok, further research indicate this might not be cifs/samba problem.
I tried with clean intall of Slackware 13.37 and Ubuntu 11.04 (praise virtualbox!)
Both show same results when mounting the Windows share.
I also tried mounting other shares on other drives to no avail.
Well.. I'm kind of exhausted. What would you suggest next?
This might be related to windows' settings or registry or something. I can't go on right now without the image of google front page burning in on my retina.
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386
Rep:
Hi Kitten,
I actually just migrated a customer's failing SAMBA server to Windows 2008 server last week and I ran into these same perplexing issues. It looks like Windows 2008/W7 have modified the way permissions were handled in Win2000/2003 server (or its just been so long since I used Windows as a file server that I just have forgotten the rules).
On the windows share give the 'Everyone' group 'Contributor' rights (essentially read/write/execute). Don't worry, share permissions are just an extra layer of permissions. Be sure to setup the local NTFS permissions the way you want to and regardless of what the share permissions are the local NTFS rights always take precedence.
BUT,and this is a big BUTT... if the share permissions are setup as reader then the user/group will never be able to write even if the underlying NTFS permissions permit it.
On this customer environment, I create security groups for the different roles and set all the NTFS permissions. Then I created the share and gave 'Everyone' 'Contributor' share permissions. Works great and the customer was very happy.
Let me know how it goes for you.
Cheers!
T3
--EDIT--
On the linux machine be sure you mount with read/write enabled:
Thanks for the advice thund3rstruck, although too bad, it didn't work
I might try Wireshark later on to see if there is some obvious glitch in the traffic, but I suspect not. I have a hunch that this is about Windows' file sharing settings. Perhaps MS has added something to their protocol CIFS can't cope with yet. Dunno, this is just speculation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.