On 2/4/2011 2:26 PM, Anton Aylward wrote:
> <stuff deleted>
> You said you and your wife both use Linux.
> So use the Linux network file sharing tools:
> NFS.
>
> Its going to be simpler.
Thanks again Anton for your quick reply. I have set up the NFS server on
all my Linux systems, and can for the most part now navigate around
Linux filesystems via the auto mounted files defined for autofs. I have
also left the Samba server running, for the moment, until I can figure
out how to use NFS to mount Windoz shares and v.s get Windoz machines to
see Linux exported files. (Future project... )
That said, even using NFS to navigate to the mounted USB drive on her
laptop, or v.s. for her to navigate to my USB drive, we hit an even
worse roadblock. The moment we try to cd into the mounted drive, we
can't even get permission to see what is there. I can demonstrate this -
Here I cd via a samba mount to the USB drive on my laptop, from my
server (or wife's laptop if you like, same results)
cd /mnt/samba/marcslaptop/slash/media/My\ Passport/
marc@bigbang:/mnt/samba/marcslaptop/slash/media/My Passport> ls
Autorun.inf FOUND.000 FOUND.002 PortableApps
StartPortableApps.exe WD Stuff
Documents FOUND.001 FOUND.003 $RECYCLE.BIN System Volume Information
and I can list out the contents of the top level directory,though I
cannot write to it from across the network.
Here I tried to cd via a NFS mount to the USB drive on my laptop, and I
am not even allowed to get there. Looks like more d$#*m Linux security
is blocking me!
marc@bigbang:~> cd /mnt/nfs/marcslaptop/slash/media/My\ Passport/
bash: cd: /mnt/nfs/marcslaptop/slash/media/My Passport/: Permission denied
<more stuff deleted>
> Now here comes the part where I cheat.
>
> I decided that the the name<->uid on all my machines should be the same.
> So files owned by anton on server have the same uid number as files
> owned by anton on the laptop. I don't have to worry about remapping.
>
> You could cheat by having your uid on your laptop as the same as your
> wife's uid on her laptop.
>
> Of course that leads to problems when you log in as yourself (different
> uid) on her laptop and try to access files on your laptop :-)
>
> This is the most transparent, the simplest way I can think of setting up
> file sharing.
I checked my UID on all my systems, including my wife's, using the ID
command. It happens to be the same - 1000 cuz I am typically the first
user set up on each system..
> SAMBA was designed for sharing files with Windows machines.
> As you and your wife are both running Linux it is completely inappropriate.
>
>> Anywise, after we have our laptops up and running, we will plug in our
>> external USB drives, and use the KDE device notifier to mount them. They
>> get mounted at - /media/MyPassport for example. There is nothing in
>> our /etc/fstab that defines this mounting AFAIK, though some of what is
>> in fstab is obtuse to me.
> The manual page is correct but terse.
> You might try right-button when you mouseover the KDE device notifier.
> You will see an option for configuration settings.
> You can set the automounting options.
The only setting I could find, for the device notifier, were settings
which control when an auto-mountable device can be mounted. Nothing
about where, or permissions associated with said device. (IMHO this is a
sadly overlooked set of features that SHOULD be configurable right
within that device notifier's configuration panel!!)
>> And I have no idea why the /media directory
>> was chosen as the place where to mount our USB drives, it was only
>> through using grep that I was able to figure out that this was where it
>> got mounted.
> I hope you mean 'find' and not 'grep' :-)
I did, mental cog slipped on me...
> I can see why it seems odd, but it is a
> "removable *media*"
> device we are talking about.
>
That's ok with me, I just WISH the device notifier would have told me,
and even better, made it a user settable parameter....
>> In your reply you referred to one line in the fstab file that I also
>> found in mine -
>>
>> usbfs /proc/bus/usb usbfs
>> noauto 0 0
>>
>> so I did some experiments, but this is somewhat obtuse to me also, so
>> not sure if I did these right -
>>
>> usbfs /proc/bus/usb usbfs
>> noauto,defaults 0 0
>>
>> and from what I could grok out of the man page for mounting usbfs file
>> systems, I took the following wild guess (and various permutations)
>>
>> usbfs /proc/bus/usb usbfs
>> noauto,devmode=0777,busmode=0777,listmode=0777 0 0
> A bit over aggressive, but I see your intent.
> I suspect you don't have device files (aka device nodes such as
> /dev/tty1) on your usb device.
Yeah, like I said, I am guessing on a lot of this.. This setting in
particular just boggles my mind and leaves me shaking my head with
wonder at how Linux gurus have come to love such obtuse parameters... I
have NO idea what devmode, busmode, and listmode mean! Don't want to
know, and don't want to have to learn. I just want an easy to use
interface with a simple model on how to establish and set permissions!
So yeah, I get aggressive about shutting off security whenever I
encounter it. LOL
> What you might want to do is try mounting from the command line with
> options and see what you get
>
> # mount -t vfat /dev/sdb1 /mnt/usbstick -o rw,nodev,noexec
>
> and play with the other items on that option list.
> The above does it for me.
>
> That would correspond to
>
> usbfs /proc/bus/usb usbfs noauto,rw,nodev,noexec 0 0
>
I tried this (had to disable the device notifier in order to do so) an
fooled around a bit with the parameters but so far no joy. One thing
that is interesting is that it appears that if I try to access the USB
drive from across the network, it become un-mountable afterwards.
Neither umount nor the device notifier can unmount it, saying some
process is still accessing it. I have been unable to track down just
what process it thinks is still using it....
>> Now, what I want to be able to do is something like the following, to
>> copy files from my laptop to my wife's USB drive -
>>
>> cp *.jpg
>> /mnt/auto/wifesLaptop/slash/media/MyPassport/Documents/Pictures
>>
>> or for my wife to be able to use Dolphin to simply drag and drop
>> pictures from her laptop to my USB drive using similar paths...
> Which gets back to WHY?
>
> If you each have /home/<username>/share/
> NFS exported
> and<otherusermachine>:/home/<otherusername>/share
> NFS mounted on your /mnt/<otherusermachine>/<otherusername>
> and a symlink from /home/<username>/<otherusername>/ to
> /mnt/<otherusermachine>/<otherusername>
>
> then you can
>
> cp *.jpg ~/wifesname/Documents/Pictures/
>
> TA-DAH!
No not so easy. It is not simply a matter of copying images across, but
to do so organizationally. I.E. certain pictures must go in certain
folders, and not being able to do that efficiently and directly from
across the network is a real PITA for us.
>
> I know that looks complicated written out like that, but is actually a
> very simple and symmetrical pattern. And very easy to set up.
>
> Forget about the USB drives for the moment, get that simple NFS working.
>
> When you've got that working we can come back and think about the USB
> issues.
>
Ok, like I said, I now have simple NFS working also. And I still cannot
access the USB drive from across the network... This is a lot harder
than it should be... sigh..
Marc..
--
To unsubscribe, e-mail: opensuse+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse+help(a)opensuse.org