LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-12-2017, 09:28 PM   #1
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 432

Rep: Reputation: 30
write router


I would like to write a file (for example .txt .html) into router box

#mount -t nfs4 ip:/192.168.1.1/directory /mnt -v
#mount -t nfs4 192.168.1.1 /mnt -v
#mount -t nfs ip:/192.168.1.1/directory /mnt -v
#mount -t nfs 192.168.1.1/directory /mnt -v
#mount.cifs 192.168.1.1/directory /mnt -v

Last edited by fhleung; 02-12-2017 at 09:31 PM.
 
Old 02-12-2017, 09:57 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,233
Blog Entries: 28

Rep: Reputation: 6116Reputation: 6116Reputation: 6116Reputation: 6116Reputation: 6116Reputation: 6116Reputation: 6116Reputation: 6116Reputation: 6116Reputation: 6116Reputation: 6116
What make/model router and have you consulted the router manual as to how to do this?
 
Old 02-13-2017, 03:51 PM   #3
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,839

Rep: Reputation: 160Reputation: 160
On Linux, /etc/ftab file can do mount automatically.

You need to add it to /etc/fstab use your favourite text editor
Be careful with this file as it can quite easily cause your system not to boot.
Add a line for the drive, the format would look like this.
This assumes the partition is formatted as ext4 as per mkfs above

#device mountpoint fstype options dump fsck

/dev/sdb1 /home/yourname/mydata ext4 defaults 0 1
 
Old 02-13-2017, 04:30 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,516

Rep: Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843
I hate to be a broken record but if you can not post a make or model number or any specific information about your router it is impossible for us to help.

http://www.linuxquestions.org/questi...6/#post5579215

Last edited by michaelk; 02-13-2017 at 04:32 PM.
 
Old 02-14-2017, 03:43 AM   #5
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
@OP: My suggestion also is to: carefully and fully read this, [<-click link]
(from the "Site FAQ" link on right side of all pages, middle dark-blue box).

Best wishes. Hope you get it working, and enjoy digging deep into Linux/Unix!

Last edited by Jjanel; 02-14-2017 at 03:50 AM.
 
Old 02-14-2017, 12:36 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by fhleung View Post
I would like to write a file (for example .txt .html) into router box

#mount -t nfs4 ip:/192.168.1.1/directory /mnt -v
#mount -t nfs4 192.168.1.1 /mnt -v
#mount -t nfs ip:/192.168.1.1/directory /mnt -v
#mount -t nfs 192.168.1.1/directory /mnt -v
#mount.cifs 192.168.1.1/directory /mnt -v
ok...did you first tell the router to export /directory over nfs or samba and allow remote connections from your computer? If so, what was the output of the commands you ran? What about log files on the router?

All you've given us is five arbitrary mount commands that presumably didn't work (you never actually said anything about what they did or did not do or any resulting error messages). That doesn't really help...it's the computer equivalent of saying, "I want to drive to the store. Car keys."

Last edited by suicidaleggroll; 02-14-2017 at 12:37 PM.
 
Old 02-22-2017, 05:07 AM   #7
wget1
LQ Newbie
 
Registered: Feb 2017
Posts: 1

Rep: Reputation: Disabled
#mount -t nfs4 ip:/192.168.1.1/directory /mnt -v
#mount -t nfs4 192.168.1.1 /mnt -v
#mount -t nfs ip:/192.168.1.1/directory /mnt -v
#mount -t nfs 192.168.1.1/directory /mnt -v
#mount.cifs 192.168.1.1/directory /mnt -v

input commands above and the output
connection refused
 
Old 02-22-2017, 06:14 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by wget1 View Post
#mount -t nfs4 ip:/192.168.1.1/directory /mnt -v
#mount -t nfs4 192.168.1.1 /mnt -v
#mount -t nfs ip:/192.168.1.1/directory /mnt -v
#mount -t nfs 192.168.1.1/directory /mnt -v
#mount.cifs 192.168.1.1/directory /mnt -v

input commands above and the output
connection refused
Are you the OP? What's with the new account?

How about:
Quote:
Originally Posted by suicidaleggroll View Post
ok...did you first tell the router to export /directory over nfs or samba and allow remote connections from your computer? What about log files on the router?
 
Old 02-22-2017, 09:25 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,516

Rep: Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843Reputation: 5843
As suggested in your other thread most home router's are configured via a web interface. If you type in the address i.e. 192.168.1.1 in your web browser it should display the main setup page however most require a username/password. In most cases the default username is admin but most router's these days use a unique password which is typically on a sticker on the bottom of the unit. Really old units used password as the password. If the router was provided by an ISP then contact them to find out the default password.

You can can try to see if any CIFS shares were configured by running the smbclient command or browsing network shares on a windows computer.

smbclient -L 192.168.1.1 (just press enter key when asked for a password)

If connection was refused we assume sharing was not configured but without knowing anything about the device we do not know if it even has the capability. Creating new threads posting the same commands without providing any new information is not helping.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
find files with at least read and write for user but not write for group (on Mac OS X) davedpss Other *NIX 11 09-09-2013 05:19 PM
read/write,write/write lock with smbclient fails swatidas11 Linux - Networking 1 03-10-2010 01:27 PM
root unable to write on drive mounted with read/write perrmission aquash2000 Linux - Server 5 07-19-2008 01:20 PM
jabberd/c2s[3948]: [5] [router] write error: Connection refused ( 111) megerdin Linux - Server 1 02-04-2008 08:25 AM
jabberd/c2s[3948]: [5] [router] write error: Connection refused ( 111) megerdin Linux - General 1 08-07-2007 07:34 AM

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

All times are GMT -5. The time now is 08:49 PM.

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