root cannot write into /usr or other read-only dirs. HOW TO?

Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions
Author Message
Thireus
DD-WRT User


Joined: 12 Mar 2009
Posts: 93

PostPosted: Sat Nov 28, 2009 19:23    Post subject: root cannot write into /usr or other read-only dirs. HOW TO? Reply with quote
Code:
root@DD-WRT:/usr# echo "plop" > hello
-sh: can't create hello: Read-only file system


:(

--------

I want to patch dropbear, but I cant! The files/dirs are protected!

So I can't run this command:

Code:
sed 's/\/usr\/libexe/\/opt\/libexe/g' dropbear


To make my SFTP work.

Any ideas about how to bypass this protection?

Note: dropbear is already installed into /usr/sbin :'(

_________________
www.DareYourMind.net
Sponsor
gruenesAlien
DD-WRT Guru


Joined: 27 Nov 2008
Posts: 717

PostPosted: Sat Nov 28, 2009 21:41    Post subject: Reply with quote
Most dirs on dd-wrt and read only. You can install dropbear from optware and use this (and patch this).

Or you can use firmware mod kit to make a custom firmware.
IVAn Dealer
DD-WRT Novice


Joined: 24 Nov 2009
Posts: 19

PostPosted: Sat Nov 28, 2009 22:05    Post subject: Reply with quote
I only did so. Added the following:

opt/etc/samba/smb.conf
[usr]
<------>comment = usr
<------>path = /usr
<------>read only = No
<------>create mask = 0664
<------>directory mask = 0775
<------>guest ok = Yes
Thireus
DD-WRT User


Joined: 12 Mar 2009
Posts: 93

PostPosted: Sat Nov 28, 2009 22:36    Post subject: Reply with quote
Samba? Confused
I just need sftp

Yeah I can install a copy of dropbear, and it's working, but it opens a new port on my router, as the 22 is already running for ssh.

_________________
www.DareYourMind.net
gruenesAlien
DD-WRT Guru


Joined: 27 Nov 2008
Posts: 717

PostPosted: Sun Nov 29, 2009 10:08    Post subject: Reply with quote
dropbear = sshd for small devices. You should kill the old dropbears processes running and start the optware dropbear. You will not need a new port if you killed the only process before.

Apart from that you might try the usage of SCP transfer method that is also secure.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum