Difference between revisions of "Netgear ReadyNAS 316"

From YobiWiki
Jump to navigation Jump to search
m
Line 52: Line 52:
 
--ignore-failed-read
 
--ignore-failed-read
   
==Apps==
 
 
===Transmission===
 
===Transmission===
  +
There is a readynas app, but better to use the Debian one if you want to tune it.
Default is admin/admin apparently
 
  +
apt-get install transmission-daemon
<br>Edit /data/Transmission/config/settings.json
+
Edit /etc/transmission-daemon/settings.json
"rpc-enabled": true,
 
  +
"download-dir":...
  +
"incomplete-dir":...
 
"rpc-password": "your_password", # note that it will be encrypted next time automatically
 
"rpc-password": "your_password", # note that it will be encrypted next time automatically
  +
"rpc-port": 9091,
 
  +
If you've some transmission settings to transfer from another machine:
"rpc-username": "your_name",
 
  +
* settings.json is in /etc/transmission-daemon/settings.json
"rpc-whitelist-enabled": "false",
 
  +
* other stuffs (blocklists, resume, torrents,...) go to /var/lib/transmission-daemon/info/
"rpc-authentication-required": "true",
 
Transgui / Transmission options / Network / Incoming port <> router firewall?
 
   
 
To fix .resume files from another location, here from /shares/.... to /data/....: file is [https://en.wikipedia.org/wiki/Bencode bencoded] but a few bash lines are enough
 
To fix .resume files from another location, here from /shares/.... to /data/....: file is [https://en.wikipedia.org/wiki/Bencode bencoded] but a few bash lines are enough
Line 75: Line 75:
 
chown guest:guest "$FILE"
 
chown guest:guest "$FILE"
 
</source>
 
</source>
  +
  +
To run it under another user:
  +
<br>Edit /etc/init.d/transmission-daemon -> USER=joe, then:
  +
systemctl --system daemon-reload
  +
chown -R joe.users /var/lib/transmission-daemon
  +
chown -R joe.users /etc/transmission-daemon
  +
 
Transgui / Transmission options / Network / Incoming port <> router firewall?
   
 
==Android==
 
==Android==

Revision as of 19:30, 14 December 2013

Links

General

Initial login: admin/password

If SSH activated, root has same pwd as admin.

Update FW

Alerts:

  • Email: recipient email
  • Advanced settings/SMTP Server: can be 127.0.0.1 if you've installed Exim (see below)
  • Advanced settings/From: sender email
  • Then don't forget to "Apply" after having sent successfully a test message

Debian

System is a Debian Wheezy
Edit /etc/apt/sources.list and add

deb http://mirrors.kernel.org/debian jessie main                                                                                                                                 
deb http://mirrors.kernel.org/debian sid main                                                                                                                                    

Create /etc/apt/apt.conf.d/00default

APT::Default-Release "stable";                                                                                                                                                   
apt-get update
apt-get install dialog
apt-get dist-upgrade
apt-get install mc screen binutils sshfs pv netcat encfs

mail

apt-get install exim4 bsd-mailx

Config: smarthost, no local email / yobi.be / visible domain name: yobi.be / smarthost: smtp.isp.xxx
Complete /etc/email-addresses

backuppc

apt-get install backuppc

Small issue because Apache is not running as the usual www-data but admin user:

chgrp admin /etc/backuppc/*
chgrp admin /usr/lib/backuppc/cgi-bin/index.cgi 
chmod u+s /usr/lib/backuppc/cgi-bin/index.cgi

Set backuppc password:

htpasswd /etc/backuppc/htpasswd backuppc

Move pool to the big partition, preserving hard links

/etc/init.d/backuppc stop
cp -a /var/lib/backuppc /home
rm -rf /var/lib/backuppc
ln -s /home/backuppc /var/lib/backuppc
/etc/init.d/backuppc start

Then visit https://readynas/backuppc
Default backup of localhost /etc will fail due to some read access issues, we can ignore them by tuning the corresponding TarClientCmd and appending to it:

--ignore-failed-read

Transmission

There is a readynas app, but better to use the Debian one if you want to tune it.

apt-get install transmission-daemon

Edit /etc/transmission-daemon/settings.json

"download-dir":...
"incomplete-dir":...
"rpc-password": "your_password", # note that it will be encrypted next time automatically

If you've some transmission settings to transfer from another machine:

  • settings.json is in /etc/transmission-daemon/settings.json
  • other stuffs (blocklists, resume, torrents,...) go to /var/lib/transmission-daemon/info/

To fix .resume files from another location, here from /shares/.... to /data/....: file is bencoded but a few bash lines are enough

#!/bin/bash
FILE="$1"
OLDDESTSIZE=$(cat "$FILE"|cut -f6 -d:|head -n1|sed 's/destination//')
OLDDEST="/shares"
NEWDEST="/data"
NEWDESTSIZE=$(($OLDDESTSIZE-${#OLDDEST}+${#NEWDEST}))
sed -i "s#:destination[0-9]\+:${OLDDEST}#:destination${NEWDESTSIZE}:${NEWDEST}#" "$FILE"
chown guest:guest "$FILE"

To run it under another user:
Edit /etc/init.d/transmission-daemon -> USER=joe, then:

systemctl --system daemon-reload
chown -R joe.users /var/lib/transmission-daemon 
chown -R joe.users /etc/transmission-daemon

Transgui / Transmission options / Network / Incoming port <> router firewall?

Android