mounting serial ports over sshfs, permission problems
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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?
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.