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-05-09 22:21:05

voljka
Member
From: Latvia
Registered: 2011-05-09
Posts: 12

Alt-F 0.1B7 and Transmission package 2.22

Hello All. Yesterday I flashed Alt-F into DNS-323 Rev.C1 and added Transmission package. I noticed one big difference between Alt-F and ffp versions of Transmission:
1) in Alt-F Transmission runs as root. This means - all files saved by it has root ownership, and I'm unable to move or delete them as simple user. This is very unusable. Please advice, what setting I missed or how to fix.
2) There is another "bug": At every startup Transmission script initialise rpc-whitelist with default values of localhost and local network.
I'm unable to add my IP addresses from workplace. Quite bad setup. Is it possible to add variable for allowed IPs to startup script?
Thank you.

P.S. FYI: DNS-323 HW.C1 firmware 1.09 + RAID0 (2 x WDC WD20EARS-00MVWB0 2000.4 GB) - > Booted in to ALT-F 0.1B7, flashed ALT-F 0.1B7, converted RAID0 from EXT3 to EXT4.
ALT-F packages installed in to /mnt/sda4 (what was created by original fw)

Last edited by voljka (2011-05-10 19:10:34)


Ooops! I did it again...

Offline

 

#2 2011-05-11 00:45:31

voljka
Member
From: Latvia
Registered: 2011-05-09
Posts: 12

Re: Alt-F 0.1B7 and Transmission package 2.22

OK, since nobody is helping, I helped myself.
Stop Transmission. And begin hacking...
1) If you want transmission daemon to run as it should run - transmission:network, you need to modify following files:
a) /etc/init.d/common
Find following code block:
===========================================
# for process match, some processes need -n, the default, others -x
if test -z "$START_STOP"; then
        START_STOP=-n
fi
===========================================
Add after it following new code block:
===========================================
# do we need to run as different user?
if test -z "$START_USER"; then
        START_USER=root
fi
===========================================
Find following code block:
===========================================
echo -n "Starting $1: "
        start-stop-daemon -S -q -o -x $*
===========================================
Modify it like that:
===========================================
echo -n "Starting $1: "
        start-stop-daemon -S -q -c $START_USER -o -x $*
===========================================
b) /etc/init.d/S81transmission
Find following code block:
===========================================
START_STOP=-x
===========================================
Add after it following new code block:
===========================================
START_USER=$TRANSMISSION_USER:$TRANSMISSION_GROUP
===========================================
c) and final step - modify permissions for transmission.log file
execute: chown transmission:network /var/log/transmission.log
(and chown -R transmission:network /var/lib/transmission)

With START_USER variable you can start any process as  any user  of your choice.

2) Problem with rpc-whitelist can be solved in following way:
In file /etc/init.d/S81transmission find following code block:
==========================================
TRANSMISSION_USER=transmission
TRANSMISSION_GROUP=network
==========================================
Add after it following new code block: (I hope you will put correct IP addresses in place)
==========================================
MY_IP="Your.Work.Subnet.*, Your.Friends.Ip.Address"
==========================================
Go next and find following code block:
==========================================
sed -i -e 's|.*"rpc-whitelist":.*|    "rpc-whitelist": "127.0.0.1,'$network',",|' \
                        "$CONFF/$JSON"
==========================================
Modify it like that:
==========================================
sed -i -e 's|.*"rpc-whitelist":.*|    "rpc-whitelist": "127.0.0.1,'$network','$MY_IP'",|' \
                        "$CONFF/$JSON"
==========================================

3) I think what umask in transmission settings.json file need to be changed to 002,
this allows RW access to files for transmission user and network group.
If you add your users to network group, then you will get full access  to downloaded files.
So change in /var/lib/transmission/settings.json umask value from 18 (dec) on to 2:
"umask": 2,

Thats all folks!
P.S. I am not a linux/unix guru, so no claims accepted.

Last edited by voljka (2011-05-11 01:28:26)


Ooops! I did it again...

Offline

 

#3 2011-05-11 00:48:24

jcard
Member
From: Portugal
Registered: 2008-09-21
Posts: 289

Re: Alt-F 0.1B7 and Transmission package 2.22

voljka wrote:

Hello All. Yesterday I flashed Alt-F into DNS-323 Rev.C1 and added Transmission package. I noticed one big difference between Alt-F and ffp versions of Transmission:
1) in Alt-F Transmission runs as root. This means - all files saved by it has root ownership, and I'm unable to move or delete them as simple user. This is very unusable. Please advice, what setting I missed or how to fix.
2) There is another "bug": At every startup Transmission script initialise rpc-whitelist with default values of localhost and local network.
I'm unable to add my IP addresses from workplace. Quite bad setup. Is it possible to add variable for allowed IPs to startup script?
Thank you.

P.S. FYI: DNS-323 HW.C1 firmware 1.09 + RAID0 (2 x WDC WD20EARS-00MVWB0 2000.4 GB) - > Booted in to ALT-F 0.1B7, flashed ALT-F 0.1B7, converted RAID0 from EXT3 to EXT4.
ALT-F packages installed in to /mnt/sda4 (what was created by original fw)

1: Edit /var/lib/transmission/settings.json and set umask to 0, as in

   "umask": 0,

2.-Edit /etc/init.d/S81transmission and comment (add a line leading # ) the line regarding  rpc-whitelist and the next one , as in

               #  sed -i -e 's|.*"rpc-whitelist":.*|    "rpc-whitelist": "127.0.0.1,'$network'",|' \
               #         "$CONFF/$JSON"

"Quite bad setup.": There are 60 possible settings for transmission! Do you really want a GUI with them all?

What you think to be a "must" others might think it  to be a nonsense.
Use a remote client to fully customize transmission, such as 'transgui', or use the command line.


Please consider discussing Alt-F at http://groups.google.com/group/alt-f/topics
Please consider filling Alt-F bugs at http://code.google.com/p/alt-f/issues/list

Offline

 

#4 2011-05-11 01:07:20

voljka
Member
From: Latvia
Registered: 2011-05-09
Posts: 12

Re: Alt-F 0.1B7 and Transmission package 2.22

jcard wrote:

"Quite bad setup.": There are 60 possible settings for transmission! Do you really want a GUI with them all?

What you think to be a "must" others might think it  to be a nonsense.
Use a remote client to fully customize transmission, such as 'transgui', or use the command line.

I do not ask GUI. But to initialize over and over same setting make non sense for me in this particular place.
I can agree that this is good to prevent users lockout from transmission management, but there is a place for improvement also.

My English is bad, I know this, so this is not a "must", but IMHO instead.
Never know about "transgui", always used "Transmission Remote GUI", will check first one.
Thank you for answers.

P.S. And I'll be happy to know, what good is to have downloaded files to be read-only and owned by root? If you have a spare time to answer.

Last edited by voljka (2011-05-11 01:17:32)


Ooops! I did it again...

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB