Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a project with a wrt54gl modem, and we need to copy a file from computer into modem (in modem /bin folder), but we have a problem when we copy the file with scp copy: "permission denied".

We try to set permissions on /bin folder, but it does not change.

Is there a way for changing permissions on /bin folder (in wrt54)?

share|improve this question
On what partition is /bin (see mount)? These embedded Linux distributions can be peculiar in this respect, see here and here – sr_ May 9 '12 at 13:22
Why do you need to put it in /bin? What's your goal? Perhaps we can find another folder also convenient where it will be possible to put you file. – Huygens May 9 '12 at 15:53

I don't think you can do this. The "/" filesystem in DD-WRT is Squashfs, although that's not easy to find out. That means that during a build of DD-WRT, a whole filesystem image gets set up, and then compressed in some manner, which renders it immutable. That way, the root filesystem fits in a router's small amount of flash.

A few config files are on read/write storage on /tmp, which is ramfs on my DD-WRT router. /etc/resolv.conf is a symlink to /tmp/resolv.conf, All the crontab stuff is links to /tmp, /etc/hosts is a symlink to /tmp/hosts.

It's not clear what you want to do with the file in /bin, but about the best you can do is scp the file to /tmp, and run it from there. You could re-generate a whole Squashfs filesystem with the file in /bin, and re-flash the router, but that seems like an awful lot of work.

share|improve this answer

Can you ssh into the modem with an account that can modify the permissions of /bin? If so, I'd use ssh and then chmod on the /bin folder to give the account that you use with scp write access.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.