Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: stunix on February 17, 2011, 09:40:54 PM

Title: Fluff mounted samba cifs dir shows as file
Post by: stunix on February 17, 2011, 09:40:54 PM

tc3.5 in a vm
I have mounted my samba server in /mnt/server/share using cifs but it opens an editor rather than display contents.  I can see the contents in a terminal and xfe, and when unmounted the fluff listing returnes to an empty dir.  Is this a bug or a case of simple config?
<edit>I can access the share by using "fluff /mnt/server/share" from a run dialog so Im guessing it may just be config</edit>
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: Rich on February 17, 2011, 10:46:43 PM
Hi stunix
When you want to access a drive it must first be attached to an empty directory to make
it a part of the filesystem. That is what mount does. When you unmount the drive you
detach it from the file system leaving you with an empty directory. That's how it works.

"it opens an editor rather than display contents. "

That's vague. Would you care to list the steps you took that caused this to happen?
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: stunix on February 17, 2011, 11:20:41 PM
sure.

well I started by mounting my share as I normally would, ie as you say creating a directory

mkdir -p /mnt/server/share

then mounting the share itself

//192.168.0.3/fileserver /mnt/server/share -t cifs -o username=me,password=secret

which then mounted the share (with filesystems.tcz installed )

I then opened fluff from the bar and navigated to /mnt/server by clicking with a mouse, when I double click /mnt/server/share item, it brings up an editor box as a file called share which is read only.  it shoould be noted that it has changed from bold to normal and the dir status is missing.

i opened a terminal and "ls -l /mnt/server/share/" and all is fine, so I installed xfe (used in dsl days) and all is fine there too.

I looked thru the fluff config file and spotted that a dir is associated with explore so I went to the run dialog and typed "fluff /mnt/server/share" which gave me a full listing but read only.

the mkdiir and mount script is now in bootlocal <edit> by writing the relevent line to fstab then mounting
bear in mind with the below pix that some of the names and passwords have been changed to protect the innocent
</edit>


mounted http://goo.gl/fb1uM
unmunted http://goo.gl/Ua7MZ
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: Rich on February 17, 2011, 11:47:58 PM
Hi stunix
The difference between a standard mount annd a cifs mount is the network aspect.
Try this in a terminal and see what happens,

cd \mnt
cd server
cd share

If it chokes it's not fluff. I don't now anything about VMWare but is it possible something
is off in it's configuration?
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: stunix on February 18, 2011, 12:02:11 AM
it seems fine in aterm and xfe.

retest3 after reboot http://goo.gl/3Lk1W

retest4 http://goo.gl/N0g5q shows share being opened in fluff from run dialog displaying contents but note the tree does not have expand or collapse next to the stunix folder indicating that it does not see the servers filesystem.

It wouldnt be anything to do with VM as the os would be completly oblivious of the fact it was on a virtual system.  the network is bridged and the dhcp address comes directly from my router.  I use VM as part of my job and have done for 5 years.

if you cant fix it, no big deal, ill use xfm.



Title: Re: Fluff mounted samba cifs dir shows as file
Post by: Rich on February 18, 2011, 12:14:24 AM
Hi stunix
Like I said, I don't know VM, just thought I'd ask. Something is certainly off. Fluff has been
going through some changes lately. I can't reproduce that behaviour. I'm running Fluff
Beta  0.8.x Dec. 2010. Click the help button in Fluff to check your version.
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: stunix on February 18, 2011, 12:17:53 AM
0.8.x
jan 11

I have just installed rox-filer and it works fine too.   

sorry.

let me know if you have any ideas you want me to try.
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: Juanito on February 18, 2011, 12:22:45 AM
I've seen similar behaviour from time to time - in my case mounting from a terminal window and viewing with emelfm, I've sometimes seen that directories are treated as files, but appear as normal in a terminal window.

I need to check, but it seems to me that the directories appear as normal on a machine without the samba extension loaded, but appear as files in some cases on a machine where the samba extension is loaded.

In both cases the share is mounted as:
Code: [Select]
sudo mkdir /mnt/public
sudo mount -t cifs //192.168.1.110/Public /mnt/public -o user=xxxx,pass=yyyy
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: Rich on February 18, 2011, 12:24:52 AM
I think we may have to wait for MikeLockmoore to weigh in on this as he is the author
of Fluff. Since the CLI and another file manager both work it might be Fluff.
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: stunix on February 18, 2011, 12:29:49 AM
I've seen similar behaviour from time to time - in my case mounting from a terminal window and viewing with emelfm, I've sometimes seen that directories are treated as files, but appear as normal in a terminal window.

I need to check, but it seems to me that the directories appear as normal on a machine without the samba extension loaded, but appear as files in some cases on a machine where the samba extension is loaded.

In both cases the share is mounted as:
Code: [Select]
sudo mkdir /mnt/public
sudo mount -t cifs //192.168.1.110/Public /mnt/public -o user=xxxx,pass=yyyy

i havnt loaded samba yet, its a very clean system, just filesystem.tcz before i added xfm and rox with deps.  I also tried with an empty backup file just the mount script in bootlocal

<edit>emelfm seems to work fine also.</edit>
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: Rich on February 18, 2011, 12:35:02 AM
You don't need to download Samba. Try downloading Cifs-utils and see if that helps.
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: stunix on February 18, 2011, 12:44:27 AM
You don't need to download Samba. Try downloading Cifs-utils and see if that helps.


i dont see it in the repository, what is the filename?

my eventual aim is to replace my all singing all dancing dsl lampp server so samba will be required later as will apache, php5, mysql, ssh, edna, udhcpd and vnc.  its not a desktop so im not too woried yet, just thought Id point it out.
no rush!  :)
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: Rich on February 18, 2011, 12:45:45 AM
cifs-utils.tcz
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: stunix on February 18, 2011, 01:05:25 AM
cifs-utils.tcz

installed but no change.  this module used the filesystems-2.6.3.33 tinycore.tcz as a dependancy as well as quite a few more, whereas I was connecting via cifs just with the filesystems-2.6.3.33 module.  Itd be nice to know the difference.
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: Rich on February 18, 2011, 01:13:52 AM
I think that maybe you should stick with filesystems-2.6.3.33 tinycore.tcz for now and
wait for Mike to spot this thread. Maybe he can shed some light on what's happening.
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: MikeLockmoore on February 18, 2011, 10:15:53 AM
Hi stunix! Thanks for posting your issue and taking the time to explore the suggestions by the other forum members.

I spotted this thread last night when there was still only one reply.  I see a lot more has transpired since then.  Unfortunately, I don't have much insight on this particular issue, probably because I don't have much experience with network file mounting, including Samba.   :-\  Actually, basically zero experience in Linux, and a trivial amount of experience with network shares in Unix maybe 17 years ago.  :-[

Fluff uses the opendir() and readdir() POSIX API functions to scan the filesystem and list files.  I don't know if these APIs have any particular limitations with network filesystems, but if so, then I think it will not be a simple fix.  I'm not familiar enough with the other file managers that seem to work OK to know how they gather the directory structure and content, but perhaps they do it in a different way.  Maybe I'll look around a bit in one or two other file managers for ideas. If they use a completely different method and it won't expand the executable much, maybe I'll consider adopting it, but it would likely take a while (weeks? months?), especially if it entails a lot of low-level recoding work.

I see you said "if you cant fix it, no big deal, ill use xfm." Short term at least, I think you will need to use another file manager.  I made Fluff to be a much lighter-weight alternative to XFE, Rox Filer, Nautilus, and so on.  I would like it to work on almost any file system, but to stay small, maybe some sacrifices must be made.  But perhaps I just need to code smarter.   Of course, I'll consider any source-code patches people send me.  ;)
--
Mike Lockmoore
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: stunix on February 18, 2011, 11:03:21 AM
Hey Mike. 

thanks for your interest.
One function which can be worked around is not a deal breaker, there is quite a bit of stuff I need to play with in this TC project before I can set it in place so Ill watch out and see what brilliant people like yourself do in the future.

If I can help let me know.

Stu
Title: Re: Fluff mounted samba cifs dir shows as file
Post by: combo3 on February 18, 2011, 01:06:46 PM
Can't reproduce error.

Was able to browse mounted samba share with Fluff using virtualbox and on network pc booted via pxe.

Maybe the problem is a config setting in virtualbox?