LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-24-2009, 01:12 AM   #1
lawson
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Rep: Reputation: 0
mounting serial ports over sshfs, permission problems


Hi,

I'm trying to mount serial ports (/dev/ttyS0 and /dev/ttyS1) on a remote machine on my laptop, using sshfs. I have successfully mounted the remote machine's /dev on ~/mnt/thor_dev on the laptop. But when I try to open one of the ports using minicom, I get the following error:
Code:
~$ minicom thor_port1 
minicom: cannot open /home/djones/mnt/thor_dev/ttyS0: Permission denied
Even though I have read and write permissions on /dev/ttyS0 on the remote machine. I've also tried setting the permissions on the remote machine for /dev/ttyS0 and /dev/ttyS1 to give all users read and write access, with no luck. Any idea what I'm doing wrong here? Is there something fundamentally different about serial ports that would make mounting them in this way impossible?
 
Old 12-24-2009, 01:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
TBH I can't give chapter and verse on exactly why, but I'm really really sure this is totally not possible. The entries in /dev/ will provide major and minor numbers to a block or character device, so are really just references to it, not the data itself unlike a conventionalfile. In a similar vein you couldn't mount a remote systems CD-rom drive either.
 
Old 12-24-2009, 02:07 AM   #3
baltho
Member
 
Registered: Aug 2004
Location: Adelaide, South Australia
Distribution: Ubuntu (Natty)
Posts: 38

Rep: Reputation: 18
Hello,
Short answer: I loaded the packages and it worked for me: had nothing connected to the serial port, but minicom started up with no error messages.

Very inventive use of sshfs, by the way, I like it!

I did, however, mount the remote /dev filesystem as root on the local machine, a non-root user on the remote - ie as root typed "mount baltho@remote:/dev ./remote_dev", which might make a difference. I was root when I ran minicom as well. I could mount the remote filesystem as myself, but was denied access like you were no matter what, when I tried to use the port.

So, either do the lot as root if you can accept the security implications of that, or perhaps ssh to the remote machine and run the terminal session there?
 
Old 12-24-2009, 03:27 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
would this not have been a connectionto the local serial port, not the remote one?
 
Old 12-24-2009, 02:19 PM   #5
lawson
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Hmm, I tried doing this as root on both ends, with no luck. I'm inclined to agree that it's not possible to do it.

Quote:
...or perhaps ssh to the remote machine and run the terminal session there?
A little background: I'm trying to do this because the remote machine is truly ancient (128 mb RAM), but it does have two serial ports. Whereas my laptop is a little more capable, but it doesn't have serial ports. So it would be great if I could somehow use the remote machine's serial ports as if they were on my laptop. I can't run my stuff on the remote machine because it just wouldn't be able to handle it (but that certainly would make things easier!). Is there some other way I could do this, or am I pretty much out of luck?
 
Old 12-24-2009, 02:59 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I can't really imagine anything that uses a serial port to require that much RAM. Any machine with 128mb is NOT ancient, it's just not got much RAM. There are plenty of things that can run on that, infact I had an Ubuntu 6.10 machine running on a p2 400 with less than that much RAM fine. It'll be stuff like X and even more so with KDE / Gnome using all the RAM, not a poor little serial port program.
 
  


Reply

Tags
serial port, sshfs



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission denied error when trying to mount image contained in sshfs mount openSauce Linux - General 2 03-08-2009 08:50 AM
Mounting With Permission Problems gacl Linux - Software 9 07-07-2007 11:43 AM
permission denied w/ SSHFS FC6 psychobyte Linux - Software 1 02-03-2007 12:04 AM
sshfs mounting read-only cgraf Linux - Software 1 08-18-2006 02:58 PM
Permission problems when mounting hd0 orange400 Linux - General 17 03-25-2003 02:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration