Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Fri Aug 17, 2018 6:01 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 310 posts ]  Go to page Previous 117 18 19 20 21 Next
Author Message
PostPosted: Tue Feb 19, 2008 12:03 pm 
Offline
Regular Member

Joined: Tue Nov 27, 2007 3:19 pm
Posts: 217
Location: Dresden, Germany
gvd wrote:
I kind of thought of something similar and came up with some shells scripts which fix the permissions/owners/groups on files to look like those I have found on a PPC freelink and another debian installation. So far it looks good. I have no issues with the servers.


Can you upload those scripts somewhere please? I'd appreciate that a lot!

_________________
LS Pro v1:
  • Freelink (Debian etch), kernel: 2.6.16.57-lsp_eabi-dh_v3, gigabit network (9k jumbo frames)
  • running: mt-daapd (aka firefly), smb, amule, vsftpd, mysql, rsnapshot, micro_evtd testing ;)
  • upcoming: ampache (+ coherence), aria2, slimrat, apache, streamripper (record what my soundbridge is playing)...


Top
   
PostPosted: Tue Feb 19, 2008 1:17 pm 
Offline
Newbie

Joined: Wed Jul 25, 2007 10:05 am
Posts: 39
Location: Japan
Oh sorry. I wanted to do that but totally forgot about it... Here we go. There are 5 scripts. The first two fix permissions and ownership of standard files. The second two fix permissions and ownership of standard directories. The last one does the "rest".

WARNING! I have tested and run these scripts on a fresh installation of Freelink rev2 before updating, upgrading, or installing any other software. The scripts may break some different permissions/owner/groups if applied later.

The first four scripts should be safe. The scripts list the directories and files to be changed. They get all the same settings: owner/group root (instead of nobody 99) and permission 644 (files) or 755 (directory). While probably a single find command could cover all those, listing them in the script individually avoids issues if you don't have a fresh installation of Freelink.

The last script covers the rest, i.e. special files and files/directories with owner/group/permissions other then the one above. You may want to go through those modifications and do them manually to verify that you don't change something wrong, in particular in /dev, e.g. check "ls -l /dev/sd*" before doing the chmod/chgrp.

The last two find commands in the last script (root3.sh) change anything left as user "nobody". Here again, you may want to check what exactly is changed before you run those two commands. To check, remove all the arguments from -exec to the end (including the -exec) and put add a -ls instead. -ls will show a listing like ls -l. Make sure that all files/directories listed can be changed safely. The find calls in the script will remove the group and world writable bits from the permissions and assign owner/group root/root. (I am just wondering if there was anything left for those find commands at all or not...)

After you ran those scripts/command you can check what is left group or world writable with
Code:
find / -wholename /proc -prune -o -perm +go+w -a \! -type l -ls
There should also be no files/directories left with owner nobody, which you can check with
Code:
find / -wholename /proc -prune -o -user nobody


Here we go. Scripts root1a.sh, root1b.sh, root2a.sh, root2b.sh, root3.sh

root1a.sh
Code:
chmod 644 /etc/issue
chmod 644 /etc/alternatives/README
chmod 644 /etc/hostname
chmod 644 /etc/resolv.conf
chmod 644 /etc/dpkg/origins/debian
chmod 644 /etc/dpkg/dselect.cfg
chmod 644 /etc/logrotate.d/aptitude
chmod 644 /etc/debian_version
chmod 644 /etc/default/bootlogd
chmod 644 /etc/default/devpts
chmod 644 /etc/default/tmpfs
chmod 644 /etc/default/halt
chmod 644 /etc/calendar/default
chmod 644 /etc/security/access.conf
chmod 644 /etc/security/group.conf
chmod 644 /etc/security/limits.conf
chmod 644 /etc/security/pam_env.conf
chmod 644 /etc/security/time.conf
chmod 644 /etc/bash_completion
chmod 644 /etc/issue.net
chmod 644 /etc/pam.d/su
chmod 644 /etc/pam.d/login
chmod 644 /etc/pam.d/chsh
chmod 644 /etc/pam.d/chfn
chmod 644 /etc/pam.d/passwd
chmod 644 /etc/pam.d/other
chmod 644 /etc/pam.conf
chmod 644 /etc/updatedb.conf
chmod 644 /etc/skel/.bash_profile
chmod 644 /etc/skel/.bashrc
chmod 644 /etc/mtab
chmod 644 /etc/securetty
chmod 644 /usr/lib/libgpm.so.1.19.6
chmod 644 /usr/lib/libasprintf.so.0.0.0
chmod 644 /usr/share/doc/gettext-base/copyright
chmod 644 /usr/share/doc/gettext-base/ABOUT-NLS
chmod 644 /usr/share/doc/gettext-base/changelog.gz
chmod 644 /usr/share/doc/gettext-base/changelog.Debian.gz
chmod 644 /usr/share/doc/libgpmg1/copyright
chmod 644 /usr/share/doc/libgpmg1/changelog.gz
chmod 644 /usr/share/doc/libgpmg1/changelog.Debian.gz
chmod 644 /usr/share/doc/mawk/README.gz
chmod 644 /usr/share/doc/mawk/ACKNOWLEDGMENT.gz
chmod 644 /usr/share/doc/mawk/copyright
chmod 644 /usr/share/doc/mawk/examples/hcal.gz
chmod 644 /usr/share/doc/mawk/examples/deps.awk.gz
chmod 644 /usr/share/doc/mawk/examples/nocomment.awk.gz
chmod 644 /usr/share/doc/mawk/examples/qsort.awk.gz
chmod 644 /usr/share/doc/mawk/examples/ct_length.awk.gz
chmod 644 /usr/share/doc/mawk/examples/hical.gz
chmod 644 /usr/share/doc/mawk/examples/primes.awk.gz
chmod 644 /usr/share/doc/mawk/examples/gdecl.awk.gz
chmod 644 /usr/share/doc/mawk/examples/decl.awk.gz
chmod 644 /usr/share/doc/mawk/examples/eatc.awk.gz
chmod 644 /usr/share/doc/mawk/changelog.gz
chmod 644 /usr/share/doc/mawk/changelog.Debian.gz
chmod 644 /usr/share/man/man3/bindtextdomain.3.gz
chmod 644 /usr/share/man/man3/gettext.3.gz
chmod 644 /usr/share/man/man3/ngettext.3.gz
chmod 644 /usr/share/man/man3/textdomain.3.gz
chmod 644 /usr/share/man/man3/bind_textdomain_codeset.3.gz
chmod 644 /usr/share/man/man1/gettext.1.gz
chmod 644 /usr/share/man/man1/vimdiff.1.gz
chmod 644 /usr/share/man/man1/helpztags.1.gz
chmod 644 /usr/share/man/man1/envsubst.1.gz
chmod 644 /usr/share/man/man1/vim.1.gz
chmod 644 /usr/share/man/man1/ngettext.1.gz
chmod 644 /usr/share/man/man1/xxd.1.gz
chmod 644 /usr/share/man/man1/mawk.1.gz
chmod 644 /usr/share/man/man8/validlocale.8.gz


root1b.sh
Code:
chown -h root:root /etc/issue
chown -h root:root /etc/alternatives/README
chown -h root:root /etc/hostname
chown -h root:root /etc/resolv.conf
chown -h root:root /etc/dpkg/origins/debian
chown -h root:root /etc/dpkg/dselect.cfg
chown -h root:root /etc/logrotate.d/aptitude
chown -h root:root /etc/debian_version
chown -h root:root /etc/default/bootlogd
chown -h root:root /etc/default/devpts
chown -h root:root /etc/default/tmpfs
chown -h root:root /etc/default/halt
chown -h root:root /etc/calendar/default
chown -h root:root /etc/security/access.conf
chown -h root:root /etc/security/group.conf
chown -h root:root /etc/security/limits.conf
chown -h root:root /etc/security/pam_env.conf
chown -h root:root /etc/security/time.conf
chown -h root:root /etc/bash_completion
chown -h root:root /etc/issue.net
chown -h root:root /etc/pam.d/su
chown -h root:root /etc/pam.d/login
chown -h root:root /etc/pam.d/chsh
chown -h root:root /etc/pam.d/chfn
chown -h root:root /etc/pam.d/passwd
chown -h root:root /etc/pam.d/other
chown -h root:root /etc/pam.conf
chown -h root:root /etc/updatedb.conf
chown -h root:root /etc/skel/.bash_profile
chown -h root:root /etc/skel/.bashrc
chown -h root:root /etc/mtab
chown -h root:root /etc/securetty
chown -h root:root /usr/lib/libgpm.so.1.19.6
chown -h root:root /usr/lib/libasprintf.so.0.0.0
chown -h root:root /usr/share/doc/gettext-base/copyright
chown -h root:root /usr/share/doc/gettext-base/ABOUT-NLS
chown -h root:root /usr/share/doc/gettext-base/changelog.gz
chown -h root:root /usr/share/doc/gettext-base/changelog.Debian.gz
chown -h root:root /usr/share/doc/libgpmg1/copyright
chown -h root:root /usr/share/doc/libgpmg1/changelog.gz
chown -h root:root /usr/share/doc/libgpmg1/changelog.Debian.gz
chown -h root:root /usr/share/doc/mawk/README.gz
chown -h root:root /usr/share/doc/mawk/ACKNOWLEDGMENT.gz
chown -h root:root /usr/share/doc/mawk/copyright
chown -h root:root /usr/share/doc/mawk/examples/hcal.gz
chown -h root:root /usr/share/doc/mawk/examples/deps.awk.gz
chown -h root:root /usr/share/doc/mawk/examples/nocomment.awk.gz
chown -h root:root /usr/share/doc/mawk/examples/qsort.awk.gz
chown -h root:root /usr/share/doc/mawk/examples/ct_length.awk.gz
chown -h root:root /usr/share/doc/mawk/examples/hical.gz
chown -h root:root /usr/share/doc/mawk/examples/primes.awk.gz
chown -h root:root /usr/share/doc/mawk/examples/gdecl.awk.gz
chown -h root:root /usr/share/doc/mawk/examples/decl.awk.gz
chown -h root:root /usr/share/doc/mawk/examples/eatc.awk.gz
chown -h root:root /usr/share/doc/mawk/changelog.gz
chown -h root:root /usr/share/doc/mawk/changelog.Debian.gz
chown -h root:root /usr/share/man/man3/bindtextdomain.3.gz
chown -h root:root /usr/share/man/man3/gettext.3.gz
chown -h root:root /usr/share/man/man3/ngettext.3.gz
chown -h root:root /usr/share/man/man3/textdomain.3.gz
chown -h root:root /usr/share/man/man3/bind_textdomain_codeset.3.gz
chown -h root:root /usr/share/man/man1/gettext.1.gz
chown -h root:root /usr/share/man/man1/vimdiff.1.gz
chown -h root:root /usr/share/man/man1/helpztags.1.gz
chown -h root:root /usr/share/man/man1/envsubst.1.gz
chown -h root:root /usr/share/man/man1/vim.1.gz
chown -h root:root /usr/share/man/man1/ngettext.1.gz
chown -h root:root /usr/share/man/man1/xxd.1.gz
chown -h root:root /usr/share/man/man1/mawk.1.gz
chown -h root:root /usr/share/man/man8/validlocale.8.gz


root2a.sh
Code:
chmod 755 /etc
chmod 755 /etc/bash_completion.d
chmod 755 /etc/rc1.d
chmod 755 /etc/alternatives
chmod 755 /etc/rmt
chmod 755 /etc/rcS.d
chmod 755 /etc/apt
chmod 755 /etc/modutils
chmod 755 /etc/rc6.d
chmod 755 /etc/terminfo
chmod 755 /etc/dpkg
chmod 755 /etc/dpkg/origins
chmod 755 /etc/rc0.d
chmod 755 /etc/vim
chmod 755 /etc/cron.daily
chmod 755 /etc/cron.daily/find
chmod 755 /etc/cron.daily/bsdmainutils
chmod 755 /etc/rc3.d
chmod 755 /etc/logrotate.d
chmod 755 /etc/default
chmod 755 /etc/rc2.d
chmod 755 /etc/rc5.d
chmod 755 /etc/calendar
chmod 755 /etc/security
chmod 755 /etc/pam.d
chmod 755 /etc/skel
chmod 755 /etc/rc4.d
chmod 755 /var
chmod 755 /var/cache
chmod 755 /var/cache/apt
chmod 755 /var/cache/apt/archives
chmod 755 /var/cache/apt/archives/partial
chmod 755 /var/cache/debconf
chmod 755 /var/cache/locate
chmod 755 /var/log
chmod 755 /var/lib
chmod 755 /var/lib/apt
chmod 755 /var/lib/apt/lists
chmod 755 /var/lib/apt/lists/partial
chmod 755 /var/lib/dpkg
chmod 755 /var/lib/dpkg/alternatives
chmod 755 /var/lib/dpkg/parts
chmod 755 /var/lib/dpkg/methods
chmod 755 /var/lib/dpkg/methods/floppy
chmod 755 /var/lib/dpkg/methods/disk
chmod 755 /var/lib/dpkg/methods/mnt
chmod 755 /var/lib/dpkg/updates
chmod 755 /var/lib/dpkg/info
chmod 755 /var/lib/urandom
chmod 755 /var/lib/misc
chmod 755 /var/backups
chmod 755 /var/spool
chmod 755 /bin
chmod 755 /lib/init
chmod 755 /lib/security
chmod 755 /lib/modules
chmod 755 /dev
chmod 755 /usr/games
chmod 755 /usr/sbin/validlocale
chmod 755 /usr/bin/envsubst
chmod 755 /usr/bin/ngettext
chmod 755 /usr/bin/gettext.sh
chmod 755 /usr/bin/helpztags
chmod 755 /usr/bin/mawk
chmod 755 /usr/bin/xxd
chmod 755 /usr/bin/gettext
chmod 755 /usr/lib/apt
chmod 755 /usr/lib/apt/methods
chmod 755 /usr/lib/dpkg
chmod 755 /usr/lib/dpkg/methods
chmod 755 /usr/lib/dpkg/methods/floppy
chmod 755 /usr/lib/dpkg/methods/apt
chmod 755 /usr/lib/dpkg/methods/disk
chmod 755 /usr/lib/mime
chmod 755 /usr/lib/mime/packages
chmod 755 /usr/lib/locate
chmod 755 /usr/lib/perl5
chmod 755 /usr/lib/perl5/Locale
chmod 755 /usr/lib/perl5/auto
chmod 755 /usr/lib/perl5/auto/Locale
chmod 755 /usr/lib/perl5/auto/Locale/gettext
chmod 755 /usr/lib/perl5/auto/Text
chmod 755 /usr/lib/perl5/auto/Text/CharWidth
chmod 755 /usr/lib/perl5/auto/Text/Iconv
chmod 755 /usr/lib/perl5/Text
chmod 755 /usr/lib/perl
chmod 755 /usr/share/base-files
chmod 755 /usr/share/bug
chmod 755 /usr/share/bug/apt
chmod 755 /usr/share/bug/vim
chmod 755 /usr/share/doc/libpopt0
chmod 755 /usr/share/doc/libncurses5
chmod 755 /usr/share/doc/libcomerr2
chmod 755 /usr/share/doc/zlib1g
chmod 755 /usr/share/doc/mount
chmod 755 /usr/share/doc/mount/examples
chmod 755 /usr/share/doc/gettext-base
chmod 755 /usr/share/doc/hostname
chmod 755 /usr/share/doc/base-files
chmod 755 /usr/share/doc/diff
chmod 755 /usr/share/doc/libgpmg1
chmod 755 /usr/share/doc/libtext-wrapi18n-perl
chmod 755 /usr/share/doc/apt
chmod 755 /usr/share/doc/apt/examples
chmod 755 /usr/share/doc/sysv-rc
chmod 755 /usr/share/doc/login
chmod 755 /usr/share/doc/sed
chmod 755 /usr/share/doc/sed/examples
chmod 755 /usr/share/doc/strace
chmod 755 /usr/share/doc/dpkg
chmod 755 /usr/share/doc/tar
chmod 755 /usr/share/doc/libblkid1
chmod 755 /usr/share/doc/initscripts
chmod 755 /usr/share/doc/libattr1
chmod 755 /usr/share/doc/aptitude
chmod 755 /usr/share/doc/aptitude/examples
chmod 755 /usr/share/doc/whiptail
chmod 755 /usr/share/doc/libuuid1
chmod 755 /usr/share/doc/makedev
chmod 755 /usr/share/doc/util-linux
chmod 755 /usr/share/doc/util-linux/examples
chmod 755 /usr/share/doc/grep
chmod 755 /usr/share/doc/procps
chmod 755 /usr/share/doc/procps/examples
chmod 755 /usr/share/doc/attr
chmod 755 /usr/share/doc/libss2
chmod 755 /usr/share/doc/e2fslibs
chmod 755 /usr/share/doc/gzip
chmod 755 /usr/share/doc/libtext-charwidth-perl
chmod 755 /usr/share/doc/bash
chmod 755 /usr/share/doc/bash/completion-contrib
chmod 755 /usr/share/doc/bsdutils
chmod 755 /usr/share/doc/libpam-runtime
chmod 755 /usr/share/doc/libpam0g
chmod 755 /usr/share/doc/libtext-iconv-perl
chmod 755 /usr/share/doc/debianutils
chmod 755 /usr/share/doc/findutils
chmod 755 /usr/share/doc/sysvinit
chmod 755 /usr/share/doc/libacl1
chmod 755 /usr/share/doc/vim-common
chmod 755 /usr/share/doc/liblocale-gettext-perl
chmod 755 /usr/share/doc/e2fsprogs
chmod 755 /usr/share/doc/acl
chmod 755 /usr/share/doc/bsdmainutils
chmod 755 /usr/share/doc/mawk
chmod 755 /usr/share/doc/mawk/examples
chmod 755 /usr/share/doc/passwd
chmod 755 /usr/share/doc/passwd/examples
chmod 755 /usr/share/doc/libpam-modules
chmod 755 /usr/share/doc/libpam-modules/examples
chmod 755 /usr/share/doc/coreutils
chmod 755 /usr/share/doc/base-passwd
chmod 755 /usr/share/doc/perl
chmod 755 /usr/share/doc/libcap1
chmod 755 /usr/share/tabset
chmod 755 /usr/share/man/cs
chmod 755 /usr/share/man/cs/man8
chmod 755 /usr/share/man/cs/man5
chmod 755 /usr/share/man/man3
chmod 755 /usr/share/man/fi
chmod 755 /usr/share/man/fi/man8
chmod 755 /usr/share/man/gl
chmod 755 /usr/share/man/gl/man8
chmod 755 /usr/share/man/ja
chmod 755 /usr/share/man/ja/man1
chmod 755 /usr/share/man/ja/man8
chmod 755 /usr/share/man/ja/man5
chmod 755 /usr/share/man/fr
chmod 755 /usr/share/man/fr/man1
chmod 755 /usr/share/man/fr/man8
chmod 755 /usr/share/man/fr/man5
chmod 755 /usr/share/man/pl
chmod 755 /usr/share/man/pl/man1
chmod 755 /usr/share/man/pl/man8
chmod 755 /usr/share/man/pl/man5
chmod 755 /usr/share/man/man7
chmod 755 /usr/share/man/man6
chmod 755 /usr/share/man/hu
chmod 755 /usr/share/man/hu/man1
chmod 755 /usr/share/man/it
chmod 755 /usr/share/man/it/man1
chmod 755 /usr/share/man/it/man8
chmod 755 /usr/share/man/it/man5
chmod 755 /usr/share/man/es
chmod 755 /usr/share/man/es/man1
chmod 755 /usr/share/man/es/man8
chmod 755 /usr/share/man/es/man5
chmod 755 /usr/share/man/sv
chmod 755 /usr/share/man/sv/man1
chmod 755 /usr/share/man/sv/man8
chmod 755 /usr/share/man/sv/man5
chmod 755 /usr/share/man/ru
chmod 755 /usr/share/man/ru/man1
chmod 755 /usr/share/man/ru/man8
chmod 755 /usr/share/man/ru/man5
chmod 755 /usr/share/man/man5
chmod 755 /usr/share/man/de
chmod 755 /usr/share/man/de/man1
chmod 755 /usr/share/man/de/man8
chmod 755 /usr/share/man/de/man5
chmod 755 /usr/share/man/ko
chmod 755 /usr/share/man/ko/man1
chmod 755 /usr/share/man/ko/man5
chmod 755 /usr/share/man/id
chmod 755 /usr/share/man/id/man1
chmod 755 /usr/share/man/id/man8
chmod 755 /usr/share/man/pt_BR
chmod 755 /usr/share/man/pt_BR/man1
chmod 755 /usr/share/man/pt_BR/man8
chmod 755 /usr/share/man/pt_BR/man5
chmod 755 /usr/share/man/man2
chmod 755 /usr/share/terminfo
chmod 755 /usr/share/terminfo/c
chmod 755 /usr/share/terminfo/p
chmod 755 /usr/share/terminfo/d
chmod 755 /usr/share/terminfo/h
chmod 755 /usr/share/terminfo/a
chmod 755 /usr/share/terminfo/v
chmod 755 /usr/share/terminfo/s
chmod 755 /usr/share/terminfo/x
chmod 755 /usr/share/terminfo/l
chmod 755 /usr/share/terminfo/r
chmod 755 /usr/share/terminfo/E
chmod 755 /usr/share/terminfo/m
chmod 755 /usr/share/terminfo/w
chmod 755 /usr/share/dpkg
chmod 755 /usr/share/dpkg/origins
chmod 755 /usr/share/vim


root2b.sh
Code:
chown -h root:root /etc
chown -h root:root /etc/bash_completion.d
chown -h root:root /etc/rc1.d
chown -h root:root /etc/alternatives
chown -h root:root /etc/rmt
chown -h root:root /etc/rcS.d
chown -h root:root /etc/apt
chown -h root:root /etc/modutils
chown -h root:root /etc/rc6.d
chown -h root:root /etc/terminfo
chown -h root:root /etc/dpkg
chown -h root:root /etc/dpkg/origins
chown -h root:root /etc/rc0.d
chown -h root:root /etc/vim
chown -h root:root /etc/cron.daily
chown -h root:root /etc/cron.daily/find
chown -h root:root /etc/cron.daily/bsdmainutils
chown -h root:root /etc/rc3.d
chown -h root:root /etc/logrotate.d
chown -h root:root /etc/default
chown -h root:root /etc/rc2.d
chown -h root:root /etc/rc5.d
chown -h root:root /etc/calendar
chown -h root:root /etc/security
chown -h root:root /etc/pam.d
chown -h root:root /etc/skel
chown -h root:root /etc/rc4.d
chown -h root:root /var
chown -h root:root /var/cache
chown -h root:root /var/cache/apt
chown -h root:root /var/cache/apt/archives
chown -h root:root /var/cache/apt/archives/partial
chown -h root:root /var/cache/debconf
chown -h root:root /var/cache/locate
chown -h root:root /var/log
chown -h root:root /var/lib
chown -h root:root /var/lib/apt
chown -h root:root /var/lib/apt/lists
chown -h root:root /var/lib/apt/lists/partial
chown -h root:root /var/lib/dpkg
chown -h root:root /var/lib/dpkg/alternatives
chown -h root:root /var/lib/dpkg/parts
chown -h root:root /var/lib/dpkg/methods
chown -h root:root /var/lib/dpkg/methods/floppy
chown -h root:root /var/lib/dpkg/methods/disk
chown -h root:root /var/lib/dpkg/methods/mnt
chown -h root:root /var/lib/dpkg/updates
chown -h root:root /var/lib/dpkg/info
chown -h root:root /var/lib/urandom
chown -h root:root /var/lib/misc
chown -h root:root /var/backups
chown -h root:root /var/spool
chown -h root:root /bin
chown -h root:root /lib/init
chown -h root:root /lib/security
chown -h root:root /lib/modules
chown -h root:root /dev
chown -h root:root /usr/games
chown -h root:root /usr/sbin/validlocale
chown -h root:root /usr/bin/envsubst
chown -h root:root /usr/bin/ngettext
chown -h root:root /usr/bin/gettext.sh
chown -h root:root /usr/bin/helpztags
chown -h root:root /usr/bin/mawk
chown -h root:root /usr/bin/xxd
chown -h root:root /usr/bin/gettext
chown -h root:root /usr/lib/apt
chown -h root:root /usr/lib/apt/methods
chown -h root:root /usr/lib/dpkg
chown -h root:root /usr/lib/dpkg/methods
chown -h root:root /usr/lib/dpkg/methods/floppy
chown -h root:root /usr/lib/dpkg/methods/apt
chown -h root:root /usr/lib/dpkg/methods/disk
chown -h root:root /usr/lib/mime
chown -h root:root /usr/lib/mime/packages
chown -h root:root /usr/lib/locate
chown -h root:root /usr/lib/perl5
chown -h root:root /usr/lib/perl5/Locale
chown -h root:root /usr/lib/perl5/auto
chown -h root:root /usr/lib/perl5/auto/Locale
chown -h root:root /usr/lib/perl5/auto/Locale/gettext
chown -h root:root /usr/lib/perl5/auto/Text
chown -h root:root /usr/lib/perl5/auto/Text/CharWidth
chown -h root:root /usr/lib/perl5/auto/Text/Iconv
chown -h root:root /usr/lib/perl5/Text
chown -h root:root /usr/lib/perl
chown -h root:root /usr/share/base-files
chown -h root:root /usr/share/bug
chown -h root:root /usr/share/bug/apt
chown -h root:root /usr/share/bug/vim
chown -h root:root /usr/share/doc/libpopt0
chown -h root:root /usr/share/doc/libncurses5
chown -h root:root /usr/share/doc/libcomerr2
chown -h root:root /usr/share/doc/zlib1g
chown -h root:root /usr/share/doc/mount
chown -h root:root /usr/share/doc/mount/examples
chown -h root:root /usr/share/doc/gettext-base
chown -h root:root /usr/share/doc/hostname
chown -h root:root /usr/share/doc/base-files
chown -h root:root /usr/share/doc/diff
chown -h root:root /usr/share/doc/libgpmg1
chown -h root:root /usr/share/doc/libtext-wrapi18n-perl
chown -h root:root /usr/share/doc/apt
chown -h root:root /usr/share/doc/apt/examples
chown -h root:root /usr/share/doc/sysv-rc
chown -h root:root /usr/share/doc/login
chown -h root:root /usr/share/doc/sed
chown -h root:root /usr/share/doc/sed/examples
chown -h root:root /usr/share/doc/strace
chown -h root:root /usr/share/doc/dpkg
chown -h root:root /usr/share/doc/tar
chown -h root:root /usr/share/doc/libblkid1
chown -h root:root /usr/share/doc/initscripts
chown -h root:root /usr/share/doc/libattr1
chown -h root:root /usr/share/doc/aptitude
chown -h root:root /usr/share/doc/aptitude/examples
chown -h root:root /usr/share/doc/whiptail
chown -h root:root /usr/share/doc/libuuid1
chown -h root:root /usr/share/doc/makedev
chown -h root:root /usr/share/doc/util-linux
chown -h root:root /usr/share/doc/util-linux/examples
chown -h root:root /usr/share/doc/grep
chown -h root:root /usr/share/doc/procps
chown -h root:root /usr/share/doc/procps/examples
chown -h root:root /usr/share/doc/attr
chown -h root:root /usr/share/doc/libss2
chown -h root:root /usr/share/doc/e2fslibs
chown -h root:root /usr/share/doc/gzip
chown -h root:root /usr/share/doc/libtext-charwidth-perl
chown -h root:root /usr/share/doc/bash
chown -h root:root /usr/share/doc/bash/completion-contrib
chown -h root:root /usr/share/doc/bsdutils
chown -h root:root /usr/share/doc/libpam-runtime
chown -h root:root /usr/share/doc/libpam0g
chown -h root:root /usr/share/doc/libtext-iconv-perl
chown -h root:root /usr/share/doc/debianutils
chown -h root:root /usr/share/doc/findutils
chown -h root:root /usr/share/doc/sysvinit
chown -h root:root /usr/share/doc/libacl1
chown -h root:root /usr/share/doc/vim-common
chown -h root:root /usr/share/doc/liblocale-gettext-perl
chown -h root:root /usr/share/doc/e2fsprogs
chown -h root:root /usr/share/doc/acl
chown -h root:root /usr/share/doc/bsdmainutils
chown -h root:root /usr/share/doc/mawk
chown -h root:root /usr/share/doc/mawk/examples
chown -h root:root /usr/share/doc/passwd
chown -h root:root /usr/share/doc/passwd/examples
chown -h root:root /usr/share/doc/libpam-modules
chown -h root:root /usr/share/doc/libpam-modules/examples
chown -h root:root /usr/share/doc/coreutils
chown -h root:root /usr/share/doc/base-passwd
chown -h root:root /usr/share/doc/perl
chown -h root:root /usr/share/doc/libcap1
chown -h root:root /usr/share/tabset
chown -h root:root /usr/share/man/cs
chown -h root:root /usr/share/man/cs/man8
chown -h root:root /usr/share/man/cs/man5
chown -h root:root /usr/share/man/man3
chown -h root:root /usr/share/man/fi
chown -h root:root /usr/share/man/fi/man8
chown -h root:root /usr/share/man/gl
chown -h root:root /usr/share/man/gl/man8
chown -h root:root /usr/share/man/ja
chown -h root:root /usr/share/man/ja/man1
chown -h root:root /usr/share/man/ja/man8
chown -h root:root /usr/share/man/ja/man5
chown -h root:root /usr/share/man/fr
chown -h root:root /usr/share/man/fr/man1
chown -h root:root /usr/share/man/fr/man8
chown -h root:root /usr/share/man/fr/man5
chown -h root:root /usr/share/man/pl
chown -h root:root /usr/share/man/pl/man1
chown -h root:root /usr/share/man/pl/man8
chown -h root:root /usr/share/man/pl/man5
chown -h root:root /usr/share/man/man7
chown -h root:root /usr/share/man/man6
chown -h root:root /usr/share/man/hu
chown -h root:root /usr/share/man/hu/man1
chown -h root:root /usr/share/man/it
chown -h root:root /usr/share/man/it/man1
chown -h root:root /usr/share/man/it/man8
chown -h root:root /usr/share/man/it/man5
chown -h root:root /usr/share/man/es
chown -h root:root /usr/share/man/es/man1
chown -h root:root /usr/share/man/es/man8
chown -h root:root /usr/share/man/es/man5
chown -h root:root /usr/share/man/sv
chown -h root:root /usr/share/man/sv/man1
chown -h root:root /usr/share/man/sv/man8
chown -h root:root /usr/share/man/sv/man5
chown -h root:root /usr/share/man/ru
chown -h root:root /usr/share/man/ru/man1
chown -h root:root /usr/share/man/ru/man8
chown -h root:root /usr/share/man/ru/man5
chown -h root:root /usr/share/man/man5
chown -h root:root /usr/share/man/de
chown -h root:root /usr/share/man/de/man1
chown -h root:root /usr/share/man/de/man8
chown -h root:root /usr/share/man/de/man5
chown -h root:root /usr/share/man/ko
chown -h root:root /usr/share/man/ko/man1
chown -h root:root /usr/share/man/ko/man5
chown -h root:root /usr/share/man/id
chown -h root:root /usr/share/man/id/man1
chown -h root:root /usr/share/man/id/man8
chown -h root:root /usr/share/man/pt_BR
chown -h root:root /usr/share/man/pt_BR/man1
chown -h root:root /usr/share/man/pt_BR/man8
chown -h root:root /usr/share/man/pt_BR/man5
chown -h root:root /usr/share/man/man2
chown -h root:root /usr/share/terminfo
chown -h root:root /usr/share/terminfo/c
chown -h root:root /usr/share/terminfo/p
chown -h root:root /usr/share/terminfo/d
chown -h root:root /usr/share/terminfo/h
chown -h root:root /usr/share/terminfo/a
chown -h root:root /usr/share/terminfo/v
chown -h root:root /usr/share/terminfo/s
chown -h root:root /usr/share/terminfo/x
chown -h root:root /usr/share/terminfo/l
chown -h root:root /usr/share/terminfo/r
chown -h root:root /usr/share/terminfo/E
chown -h root:root /usr/share/terminfo/m
chown -h root:root /usr/share/terminfo/w
chown -h root:root /usr/share/dpkg
chown -h root:root /usr/share/dpkg/origins
chown -h root:root /usr/share/vim


root3.sh
Code:
chown -h root:root /var/local
chmod 2775 /var/local
chown -h root:root /var/lock
chmod 1777 /var/lock
chmod g-x,o-rwx /dev/sd*
chgrp -h disk /dev/sd*
chmod a-x /dev/urandom /dev/random
chgrp -h disk /dev/ram*
chmod 660 /dev/ram*
chmod 660 /dev/psaux
chmod 660 /dev/rtc
chgrp -h audio /dev/rtc
chmod 660 /dev/video0
chgrp -h video /dev/video0
chmod 2775 /home
chown -h -R root:root /lib/modules/2.6.12.6-arm1
chmod -R go-w /lib/modules/2.6.12.6-arm1
find / -wholename /proc -prune -o -user nobody -a \! -type l -exec chmod go-w {} \; -print
find / -wholename /proc -prune -o -user nobody -exec chown -h root:root {} \; -print


Top
   
PostPosted: Tue Feb 19, 2008 2:32 pm 
Offline
Regular Member

Joined: Tue Nov 27, 2007 3:19 pm
Posts: 217
Location: Dresden, Germany
Now that's what I'd call a comprehensive reply! :D Thank you very much!

Unfortunately I already performed all of the post installation steps mentioned on the wiki page incl. aptitude update, upgrade etc., installed a new kernel and also moved /usr to/mnt/disk1. So it seems I should re-install Freelink for safety and start from scratch (...again - already reinstalled Freelink after I accidently deleted /var last night. Never do imported stuff when you're sleepy ;)) .

_________________
LS Pro v1:
  • Freelink (Debian etch), kernel: 2.6.16.57-lsp_eabi-dh_v3, gigabit network (9k jumbo frames)
  • running: mt-daapd (aka firefly), smb, amule, vsftpd, mysql, rsnapshot, micro_evtd testing ;)
  • upcoming: ampache (+ coherence), aria2, slimrat, apache, streamripper (record what my soundbridge is playing)...


Top
   
PostPosted: Tue Feb 19, 2008 2:47 pm 
Offline
Newbie

Joined: Wed Jul 25, 2007 10:05 am
Posts: 39
Location: Japan
Well, if you consider reinstalling from scratch you can of course run the scripts and see how well it works. root{1,2}{a,b}.sh should be no problem. Afterwards run the two find commands to locate all group/world writable files and all files with owner nobody to see what is left. The really critical stuff is in the last script. I don't think that there should be an issue even if you have upgraded etc. But of course, I cannot guarantee you. If you run the first four scripts and then check the rest of the last script manually I think you should be on the safe side in most cases.


Top
   
PostPosted: Wed Feb 20, 2008 4:48 am 
Offline
Newbie

Joined: Mon Feb 11, 2008 3:41 pm
Posts: 32
thank you very much for yours scripts and your time, i ran all of them in my linkstation upgraded to lenny.
looks like they performed well but Im sad because i never know if this "debian" is secure and stable anymore.... freelink is really messed up, there are too much files and i cant be sure if all is fine :-\ and theres lots of suid files too and you never know wich ones are right,
im afraid this cant be fixed with scripts,

and if its so messed up for a single view of a normal user like me it makes me fear what could be inside the code!

if i could find another way of reinstall everything from scratch and be sure i'll do it, im trying to understand the debootstrap thing from official debian repositorys, make a tarball with it and REWRITE EVERYTHING in ROOT maybe ill do it tomorrow but im not sure even if my ls live will boot after that.......

_________________
Ls Live v2, Partitions resized, Debian Armel (lenny), Kernel 2.6.25.3, xfs removed, reiserfs added, serial cable broke and Fuse 1 blowned.


Top
   
PostPosted: Wed Feb 20, 2008 10:15 am 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7703
Location: Austria, Vienna
goauld: work is ongoing to get a completely fresh armel debian on the arm-boxes. continue reading here
viewtopic.php?f=18&t=5736

_________________
LS1 (2.6 kernel, foonas svn1062, 750 GB, UBoot 1.2) & LS Pro (FreeLink/jtymod/GenLink, changes all the time)
Thx to all donators!


Top
   
PostPosted: Fri Feb 22, 2008 7:32 pm 
Offline
Newbie
User avatar

Joined: Sun Oct 07, 2007 11:29 pm
Posts: 27
Location: Germany
If you want to create a CSV file of all Freelink files with their owner, group and permissions, then just use this find command:
Code:
find -P / -xdev ! -name "files.freelink*" -printf %p\;%#m\;%u\;%g\;\\n >files.freelink_arm9-1.0rev2.csv

To get a list of all installed packages use this command:
Code:
dpkg -l >packages.freelink_arm9-1.0rev2

To create a comparison list on another system use the following script:
Code:
#!/bin/bash

if [ -z $1 ]
 then
  echo 'ABORT!!! Please state input CSV file'
  exit 1
fi

LIST_BASE="files.compare."`date +%Y%m%d_%H%M%S`
LIST_FOUND="${LIST_BASE}.found.csv"
LIST_NOTFOUND="${LIST_BASE}.notfound.csv"
rm -f ${LIST_FOUND}
touch ${LIST_FOUND}
rm -f ${LIST_NOTFOUND}
touch ${LIST_NOTFOUND}

cat $1 | while read LINE
 do
# Get properties of Freelink file into variables
  FILE=`echo ${LINE} | cut --delimiter=\; --fields=1`
  PERM_FL=`echo ${LINE} | cut --delimiter=\; --fields=2`
  USER_FL=`echo ${LINE} | cut --delimiter=\; --fields=3`
  GROUP_FL=`echo ${LINE} | cut --delimiter=\; --fields=4`

# Get properties of Freelink file in this system
# then store filename, this system's properties and Freelink's properties into a single new file
  NEWLINE=`find -P ${FILE} -maxdepth 0 -printf %p\;${PERM_FL}\;${USER_FL}\;${GROUP_FL}\;%#m\;%u\;%g\;`
  RC=$?
  if [ ${RC} -eq 0 ]
   then
# --> List of found files
    echo "${NEWLINE}" >>${LIST_FOUND}
  else
# --> New list with not found files, so you can re-start with a reduced list later
#     Using original line to keep comments
    echo "${LINE}" >>${LIST_NOTFOUND}
  fi
done

I did a comparison against Debian 4.0r3 and most files were found (13.454), but some files were not (1.605).
It seems that a lot of garbage is left from the development phase and testing of Freelink (e.g. base-config and other packages from 3.1 Sarge and the unpurged packages like hotplug and netkit-inetd).
Some files were not found because of the different prozessor (i386) of the virtual machine, or because they are buffalo-related stuff.

Some packages seem to be still installed because these were automatically installed by apt-get. Using aptitude right from the beginning would have avoided this.

I uploaded all files here (link updated 2008-02-25 23:30 CET).

Would be cool if somebody could continue working on the not found files, as I will not have enough time for this in the next two weeks.

Use dpkg -S <filename> to find the corresponding package, e.g. dpkg -S bin/wget (note the missing leading / ) to find out that Debian 4.0 stores wget in /usr/bin and not /bin.
Therefore wget is two times inside the Freelink image, once at the typical place of Debian 4.0 in /usr/bin and once in /bin.

Maddes

_________________
http://www.maddes.net/
Linkstation Live V2 (HS-DHGL)(LSL2) with Debian Lenny incl. 2.6.26-2 kernel.


Last edited by maddes on Sat Jul 10, 2010 4:00 pm, edited 1 time in total.

Top
   
PostPosted: Wed Feb 27, 2008 1:39 am 
Offline
Total Newbie

Joined: Wed Feb 27, 2008 1:34 am
Posts: 4
Hi. I'm running FreeLink_arm9-1.0rev2 on a KuroBox Pro (great work on this BTW). I'm having trouble getting nfsd to start. When I try to start the service, I get:

root@kuro:/boot# /etc/rc2.d/S20nfs-kernel-server restart
Stopping NFS kernel daemon: mountd nfsd.
Unexporting directories for NFS kernel daemon....
* Not starting NFS kernel daemon: no support in current kernel.
(I searched for this error on Google and didn't find anything interesting)

I set up the development environment on my Linux laptop and it looks like the nfsd should be built into the kernel.

Some other info:
my /etc/exports is default. I modified /etc/hosts.allow:
portmap : 127. : ALLOW
portmap : ALL : ALLOW

root@kuro:/boot# rpcinfo -p localhost
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 1024 status
100024 1 tcp 1025 status

I must be doing something really dumb. Can anyone spot the problem? Thanks!


Top
   
PostPosted: Wed Feb 27, 2008 1:46 am 
Offline
Newbie

Joined: Wed Jul 25, 2007 10:05 am
Posts: 39
Location: Japan
There are two nfs server debian packages: nfs-kernel-server and nfs-user-server. You have installed the kernel server which requires nfs support compiled into the kernel.

Option 1: recompile the kernel with nfs support
Option 2: user the user space nfs server nfs-user-server instead.

See

http://packages.debian.org/etch/nfs-user-server
http://packages.debian.org/etch/nfs-kernel-server


Top
   
PostPosted: Wed Feb 27, 2008 2:02 am 
Offline
Total Newbie

Joined: Wed Feb 27, 2008 1:34 am
Posts: 4
Thanks for the reply. Dang. I thought it was already built in. Now I have yet another chance to brick my box :)


Top
   
PostPosted: Wed Feb 27, 2008 5:41 am 
Offline
Moderator
User avatar

Joined: Thu Apr 06, 2006 1:33 pm
Posts: 1082
Location: United States of America
DorkGently wrote:
Thanks for the reply. Dang. I thought it was already built in. Now I have yet another chance to brick my box :)


Not that I needed it, however by using the 2.6.16.57 kernel (and modules) I seemed to have a working kernel-nfs on a Kuro-Pro. However the whole thing is very alpha I think.

I manually installed freelink (debian) as described here: FreeLink for the Kurobox Pro - Manual install

_________________
-Ramuk

LinkStation HG *250 Uboot - Foonas-EM - Freelink
Kuro HG *750 Uboot - Foonas-EM - Debian Squeeze
Kuro HD *60 Uboot - Foonas-EM - Debian Squeeze (For Sale)
KuroPro *2TB Debian Lenny Armel- Kernel 2.6.26
KuroPro *1TB Debian Lenny Armel- Kernel 2.6.25.6


Top
   
PostPosted: Wed Feb 27, 2008 6:03 am 
Offline
Newbie

Joined: Mon Sep 17, 2007 2:58 am
Posts: 15
I am using mindbender's kernel and a manually installed freelink on a Kuro Pro and NFS works. I've pushed about 40gigs through NFS so far but have had it lock up a few times. (I'm not fully certain whether it was NFS or my ethernet connection on the client -- which can be flaky at times.)

Haven't really put NFS through any serious paces yet but it definitely works. I have no clue, as Ramuk suggests, of the alphaness of it all.


Top
   
PostPosted: Fri Feb 29, 2008 9:48 pm 
Offline
Total Newbie

Joined: Wed Feb 27, 2008 1:34 am
Posts: 4
Thanks all. I got a new 2.6.12-6 kernel compiled with the NFS server and it works! I don't know how stable or fast it is yet.

My next task is getting my USB sound card to work. I compiled the bits in when I did the NFS server build so it detects my card but when I try to play something the program sits at 100% CPU and nothing happens. strace shows nothing happening. Maybe I'll have to upgrade to a newer kernel.


Top
   
PostPosted: Thu Nov 13, 2008 8:54 pm 
Offline
Newbie

Joined: Tue Apr 17, 2007 10:08 am
Posts: 18
Just a question some kind soul out there will answer also it might have been answered somewhere :-)
But I'm pretty busy right now and I don't have time to read through tons of stuff here...

Will freelink help to get my linkstation
- faster regarding transfer of big files
- faster regarding transfer of many small files
- to spin down it's hd if not needed
- power off/on following a time scedule

I know that some of this points might be impossible due to the hardware... But if only one of this question will be a "yes" I will take the risk and time to switch to freelink...


Top
   
PostPosted: Thu Nov 13, 2008 10:25 pm 
Offline
Site Admin
User avatar

Joined: Tue Jul 12, 2005 11:26 am
Posts: 3701
Location: JAPAN
Code:
Will freelink help to get my linkstation
- faster regarding transfer of big files

Yes but then updating Samba and the kernel + 1000Mb will do this
Code:
- faster regarding transfer of many small files

Yes but same as above.
Code:
- to spin down it's hd if not needed

No not on any platform. This is a always on design.
Code:
- power off/on following a time scedule

upgrading to micro_evtd will get you this with or without Freelink.

Hope this helps?

_________________
LS used as PVR and streaming source


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 310 posts ]  Go to page Previous 117 18 19 20 21 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 8 guests


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 post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited