LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-03-2011, 03:24 PM   #1
Kitten78
LQ Newbie
 
Registered: Sep 2006
Distribution: Slackware, Ubuntu
Posts: 11

Rep: Reputation: 0
Samba displaying a windows share incorrectly


I'm starting to lose my hair with this problem.

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

MIDs:
 
Old 05-03-2011, 06:02 PM   #2
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Rep: Reputation: 43
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?
 
Old 05-17-2011, 09:34 AM   #3
Kitten78
LQ Newbie
 
Registered: Sep 2006
Distribution: Slackware, Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
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
 
Old 05-17-2011, 11:11 AM   #4
Kitten78
LQ Newbie
 
Registered: Sep 2006
Distribution: Slackware, Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
Old 05-17-2011, 06:22 PM   #5
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Rep: Reputation: 43
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:

Code:
mount.cifs //blue/Data .mnt_blue_data/ -o username=myuser,rw,file_mode=0777,dir_mode=0777

Last edited by thund3rstruck; 05-17-2011 at 06:25 PM. Reason: added linux mount options
 
Old 05-18-2011, 10:25 AM   #6
Kitten78
LQ Newbie
 
Registered: Sep 2006
Distribution: Slackware, Ubuntu
Posts: 11

Original Poster
Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble mounting Samba share from Windows Mobile 6.1 - samba weirdness cleidh_mor Linux - Server 0 09-21-2008 02:43 PM
mount windows share export to samba share -> improve network performance tuning newuser77 Linux - Server 1 07-23-2008 11:28 AM
Large file sizes listed incorrectly in a samba share Pain++ Linux - Software 3 05-02-2008 06:01 AM
Videos displaying incorrectly, independent of player ErrorBound Debian 4 10-29-2006 03:39 PM
Samba displaying incorrect disk capacity on windows clients... fred22 Linux - Software 1 03-30-2006 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration