reading usbstick across a network

This is a discussion on reading usbstick across a network within the Linux Networking forums, part of the Linux Forums category; I cant get at my usb ports on my desktop, but can on my laptop ( next to it & networked) ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-10-2004
p cooper
 
Posts: n/a
Default reading usbstick across a network

I cant get at my usb ports on my desktop, but can on my laptop ( next to it
& networked)
1) i can mount the pendrive from the laptop
from laptop - /etc/fstab
/dev/sda /mnt/pendrive auto moauto,user,exec,umask=000 0 0
I can read and write to the pendrive as laptop user

from the desktop:
bash-2.05b# mount -t nfs 192.168.1.9:/mnt/pendrive /mnt/pendrive
bash-2.05b# ls /mnt/pendrive
Blank10.xls Differential Equations.sxw Music Coursework.sxw
change to user and I can still see the files:

from the desktop

bash-2.05b$ cp /mnt/pendrive/Music\ Coursework.sxw /tmp
cp: cannot stat `/mnt/pendrive/Music Coursework.sxw': Input/output error

bash-2.05b$ ls -la /mnt/pendrive
ls: /mnt/pendrive/Music Coursework.sxw: Input/output error
ls: /mnt/pendrive/Differential Equations.sxw: Input/output error
ls: /mnt/pendrive/Blank10.xls: Input/output error
ls: /mnt/pendrive/.directory: Input/output error

and in Konqueror (as user) desktop(/mnt/pendrive ) appears empty

this is linux - there must be a solution :-))
Reply With Quote
  #2 (permalink)  
Old 05-10-2004
Ralf Herrmann
 
Posts: n/a
Default Re: reading usbstick across a network

Hi,

> I cant get at my usb ports on my desktop, but can on my laptop ( next to it
> & networked)
> 1) i can mount the pendrive from the laptop
> from laptop - /etc/fstab
> /dev/sda /mnt/pendrive auto moauto,user,exec,umask=000 0 0
> I can read and write to the pendrive as laptop user
>
> from the desktop:
> bash-2.05b# mount -t nfs 192.168.1.9:/mnt/pendrive /mnt/pendrive
> bash-2.05b# ls /mnt/pendrive
> Blank10.xls Differential Equations.sxw Music Coursework.sxw
> change to user and I can still see the files:
>
> from the desktop
>
> bash-2.05b$ cp /mnt/pendrive/Music\ Coursework.sxw /tmp
> cp: cannot stat `/mnt/pendrive/Music Coursework.sxw': Input/output error


Hust a guess: do you (or the user sent by nfs) have read permissions
on the files you wanted to copy?

I had a similar problem with samba.
Some files on my shares were listable, but i could not open them in any way.
The Dir had browse permission to anyone, but the files were only accessible by
it's owner.....

HTH

Ralf
Reply With Quote
  #3 (permalink)  
Old 05-10-2004
p cooper
 
Posts: n/a
Default Re: reading usbstick across a network

plaptop root # cd /mnt/pendrive/
plaptop pendrive # ls -la
total 773
drwxrwxrwx 2 root root 512 Jan 1 1970 .
drwxr-xr-x 7 root root 216 May 8 21:45 ..
-rwxrwxrwx 1 root root 44 May 9 19:04 .directory
-rwxrwxrwx 1 root root 505856 May 8 22:16 Blank10.xls
-rwxrwxrwx 1 root root 125729 May 8 21:52 Differential Equations.sxw
-rwxrwxrwx 1 root root 157597 May 8 21:52 Music Coursework.sxw


everything is 777 !
Reply With Quote
  #4 (permalink)  
Old 05-11-2004
Steve Wolfe
 
Posts: n/a
Default Re: reading usbstick across a network


How are you exporting it - Samba, or NFS? Most pendrives have a VFAT file
system, and if I recall, you can't reliably export VFAT via NFS.

steve


Reply With Quote
  #5 (permalink)  
Old 05-11-2004
p cooper
 
Posts: n/a
Default Re: reading usbstick across a network

the pen is vfat - mounted from the laptop
/dev/sda*/mnt/pendrive*auto*moauto,user,exec,umask=000*0*0*

works as well sith -t vfat

accesing laptop:/mnt/pendrive from the desktop has to be nfs
vfat here gives a device not accessible error message

mount*-t*nfs*192.168.1.9:/mnt/pendrive*/mnt/pendrive*



Steve Wolfe wrote:

>
> How are you exporting it - Samba, or NFS? Most pendrives have a VFAT
> file
> system, and if I recall, you can't reliably export VFAT via NFS.
>
> steve
>
>


Reply With Quote
  #6 (permalink)  
Old 05-11-2004
Steve Wolfe
 
Posts: n/a
Default Re: reading usbstick across a network

> the pen is vfat - mounted from the laptop
> /dev/sda /mnt/pendrive auto moauto,user,exec,umask=000 0 0
>
> works as well sith -t vfat
>
> accesing laptop:/mnt/pendrive from the desktop has to be nfs
> vfat here gives a device not accessible error message


So, you are trying to export a vfat file system via NFS. I looked into it
a bit further, and while vfat via NFS used to be a "it just won't work",
that's not *necessarily* the case any more. However, you have to be running
the right kernel versions, nfs-utils, etc.. As an example, a message on
LKML indicates that some versions (such as 2.4.24) worked, while some (like
2.4.25) did not. And, some of RedHat's nfs-utils will let you do it, some
won't. You have three options here:

1. Format the pendrive with ext2. It'll work great with Linux, and will
export nicely via NFS. Unfortunately, it won't work with Windows.

2. You can export the vfat file system with samba instead of NFS.

3. You can do a lot of googling and version comparisons until you find the
combination that works.

steve


Reply With Quote
  #7 (permalink)  
Old 05-13-2004
p cooper
 
Posts: n/a
Default Re: reading usbstick across a network

been having a go with samba server running on the laptop
from the laptop running samba

dadslaptop root # tail -n 7 /etc/samba/smb.conf

[pendrive]
comment =PenDrive in Pauls Laptop
path=/mnt/pendrive
public=yes
writeable=yes

from the desktop

bash-2.05b# smbclient -I 192.168.1.9 //dadslaptop/pendrive
Password:
Domain=[DADSLAPTOP] OS=[Unix] Server=[Samba 3.0.2a]
smb: \> ls
. D 0 Thu Jan
.. D 0 Sat May
Music Coursework.sxw A 157597 Sat May
Differential Equations.sxw A 125729 Sat May
Blank10.xls A 505856 Sat May
.directory AH 44 Sun May
smb: \> q
bash-2.05b# whoami
root
bash-2.05b# ls -la /mnt/pendrive
total 1
drwxrwxrwx 2 paul users 48 May 9 16:19 .
drwxr-xr-x 13 root root 336 May 9 16:19 ..
bash-2.05b#

can get to it with smbclient but cant browse or copy from /to



Reply With Quote
  #8 (permalink)  
Old 05-13-2004
p cooper
 
Posts: n/a
Default Re: reading usbstick across a network

sorry -missed a bit
bash-2.05b# mount -t smbfs -o
username=paul,password=sackbutt //dadslaptop/pendrive /mnt/pendrive
22860: Connection to dadslaptop failed
SMB connection failed
bash-2.05b# mount -t smbfs -o username=paul,password=sackbutt
192.168.1.9//dadslaptop/pendrive /mnt/pendrive
Usage: mount.smbfs service mountpoint [-o options,...]
Version 3.0.2a

Options:
username=<arg> SMB username
password=<arg> SMB password
credentials=<filename> file with username/password
etc etc

also from fstab
//dadslaptop/pendrive
or
192.168.1.9//dadslaptop/pendrive mnt/pendrive smbfs
noauto,password=sackbutt 0 0


and it fails to mount ( with the smbfs error message)

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:50 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0