DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-01-04 20:34:03

puterboy
Member
Registered: 2008-09-18
Posts: 306

Does latest DNS-323 firmware still have *evil* "chmod -R a+w" line?

The automagic recursively make all directories world writeable strikes me as one of the most evil and insidious lines ever in a Linux system.
Even knowing about this, I still sometimes forget to make the root of a drive 777 and then like magic, all my permissions silently get changed to world writeable.

So, I was wondering whether the latest firmwares (I am still on 1.05) have eliminated this bastard line?
If not, has anyone figured out a way of neutering it automatically in the firmware or otherwise?

Thanks

Offline

 

#2 2011-01-04 22:10:01

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Does latest DNS-323 firmware still have *evil* "chmod -R a+w" line?

puterboy wrote:

The automagic recursively make all directories world writeable strikes me as one of the most evil and insidious lines ever in a Linux system.

Indeed. If you're running into this (by accident, of course) while experimenting with a Linux distro on hard disk, you may want to try installing the Linux distro into some subdirectory (and use an initrd to chroot into it during boot). This way, you don't need to touch the dangerous permission bits. I've done it this way to run Slackware (see wiki)

Offline

 

#3 2011-01-05 06:24:06

bound4h
Member
Registered: 2010-04-12
Posts: 209

Re: Does latest DNS-323 firmware still have *evil* "chmod -R a+w" line?

What do you mean by chmod -R a+x?  I mean, I know what the command means, but are you saying when you upgrade your firmware it chmod's your whole drive?  If so, which version are you referring to?  Pardon the dumb question, just trying to clarify.

Offline

 

#4 2011-01-05 07:57:47

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Does latest DNS-323 firmware still have *evil* "chmod -R a+w" line?

Offline

 

#5 2011-01-06 06:41:28

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Does latest DNS-323 firmware still have *evil* "chmod -R a+w" line?

And to clarify further, this happens silently and without warning EVERY time you boot.
I believe it only affects drives that are mounted as part of the boot process so if you manually mount a USB drive later it should be safe (this is from memory so I may be wrong).

That said, I have still "outsmarted" myself once or twice here since I typically reload the kernel to put the original firmware on a USB root -- of course since the USB root filesystem that I use is intentionally a copy of the original unpacked firmware it too does the evil chmod a+w action and since I now have a USB root and some other USB mounts as part of my fstab, it merrily goes and chmod's all those mounted partitions too.

I am soo tempted just to mod my fimware to bleep out those lines!

Offline

 

#6 2011-01-06 16:11:07

bound4h
Member
Registered: 2010-04-12
Posts: 209

Re: Does latest DNS-323 firmware still have *evil* "chmod -R a+w" line?

Yes, a new D-LINK FW modded by puterboy!  Post when ready big_smile

Offline

 

#7 2011-01-21 11:35:40

cdrice
New member
Registered: 2007-06-13
Posts: 1

Re: Does latest DNS-323 firmware still have *evil* "chmod -R a+w" line?

This just bit me today (1.09 firmware) on one of my 323s; a quick forum search led me to this thread.  That is, indeed, EVIL.  Just plain evil.

At least I have 2 other 323s with nearly identical installs so I can do some trickery to figure out the best way to recover.

I had a sinking feeling when the reboot was taking longer than I expected, and the 323 was chugging on the disks pretty hard.  Now it makes sense.  EVIL.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB