possibly a stupid question: How do I read / write to a NAS filesystem

R

RickM

I have a cheapo WD WorldBook NAS that I would like to access from a
Ruby application. This may actually be more about how to properly
mount the NAS so I can access it but I thought I would start here. I
am running Ubutu and when I browse the NAS I see a path smb://mybookworld/public/
but Dir.entries("smb://mybookworld/public/") doesn't work or any other
form I could dream up.
 
D

Dylan Evans

[Note: parts of this message were removed to make it a legal post.]

You will need to mount the NAS drive, after which you will be able to access
it as part of your file system. When you browse the drive the the file
manager interprets the uri to access the NAS, when you open it Dir is
expecting a regular filepath. Try something along the lines of;
mount -t smbfs //myworldbook/public /mnt/
and
Dir.entries("/mnt/")

But this is just a guess since i don't use samba
 
M

Michal Suchanek

2009/2/26 Dylan Evans said:
You will need to mount the NAS drive, after which you will be able to access
it as part of your file system. When you browse the drive the the file
manager interprets the uri to access the NAS, when you open it Dir is
expecting a regular filepath. Try something along the lines of;
mount -t smbfs //myworldbook/public /mnt/
and
Dir.entries("/mnt/")

Alternatively, you can use smbclient to access the NAS without mounting.

HTH

Michal
 
D

Dylan Evans

[Note: parts of this message were removed to make it a legal post.]

Alternatively, you can use smbclient to access the NAS without mounting.

I don't understand how you would do this? Do you mean by using smbclient to
fetch resources or is there some other usage from ruby i'm not aware of?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top