Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am having an issue with Ubuntu Natty (32 bit version) trying to access a directory on a FreeNAS server (set up to share files using samba) that is also on the local network. It seems that if there are under a certain number of files (just under 500, maybe 497 or 498) it can access the directory just fine. Add one more file, and Ubuntu refuses to show anything in the directory. However if I change the filename of the last added file to something very short (like 1.ext) then it will sometimes display it.

There is no such limit on files on local hard drives connected to the Ubuntu system. Also, all non-Ubuntu computers on the network have no problem accessing the directory on the FreeNAS server, so that pretty well seems to narrow it down to being an issue with Ubuntu accessing files over a network (and maybe only when samba is being used, though I don't know that). This is just a plain local network connection using samba; I am not using any sort of "tunnel" or VPN or anything like that, and I haven't played around with any settings that would change the way packets are sent or received.

So my question is, when accessing a directory on a remote share (using samba) is there any limit in Ubuntu on the number of files in a directory, or the number of characters in the combined filenames within the directory, or any other limit that might explain this strange behavior? If anyone even thinks they might have an explanation for this issue I'd like to hear it because so far nothing about this has made any sense. But if I can't get it resolved I may wind up having to install some other operating system on this computer, just so I can access my files on the FreeNAS share.

Basically I am wondering if there might be some value in some configuration file (maybe sysctl.conf?) that could be changed to avoid this problem. Please note that I am not a Linux or Ubuntu expert (just because I know what sysctl.conf is, don't assume I have been playing around with it — in fact I only learned about that file earlier today).

share|improve this question

closed as off topic by Jorge Castro, Ringtail, Mik, RolandiXor, belacq Nov 12 '12 at 17:08

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
There certainly shouldn't be a limit. What program do you use to look at the file? Does it make a difference if you open a terminal in that directory and run the ls command? Are you sure the problem is on Ubuntu and on the FreeNAS server? –  Gilles Apr 28 '12 at 23:21
    
It happens no matter what I use in Ubuntu, whether the native file browser, accessing it from inside a program, or through the terminal. It always gives the same message (this is from the terminal but the error is the same: $ ls ls: reading directory .: Invalid argument Also I've observed this only in Ubuntu - tested access from a Windows box and a Mac OS X box and neither has any problem. –  user57971 Apr 29 '12 at 4:07
    
Sorry for the poor formatting in the above but I could not figure out how to add linefeeds and ran out of time. Just wanted to add that if trying to acces the file from the native file browser I get a popup that says "The folder contents could not be displayed" followed by 'Sorry, could not display all the contents of "(directory name)": Invalid argument.' It gives no clue at all what the "invalid argument" might be. I also tried accessing it from a system running Ubuntu 10.10 and got the same error, and that's an entirely different computer. –  user57971 Apr 29 '12 at 4:20
    
@Gilles, please see my comments above, and now I see that this probably IS a bug in Ubuntu that goes all the way back to version 9.10 - see ubuntuforums.org/showthread.php?t=1359375 –  user57971 Apr 29 '12 at 4:50
    
That does look like a bug in the Samba driver. Please make sure that it is reported and add any useful information you can if there's an existing bug report. Please read How do I report a bug? –  Gilles Apr 29 '12 at 14:04