WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: what files/folders for TCB with persistence----- need setuid set?  (Read 2229 times)

aus9

  • Guest
ahh lets try a longer subject line

I have borked my hard drive install of TC sitting on /dev/sda2
This has a persistent home, tc and opt folders
trivia below

I have a heap of downloaded TCZs so would prefer to recover the situation that have to start again if possible

Being an idiot I may have gone into sda2 from the other distro and removed all bits setuid using eg
Code: [Select]
sudo chmod g-s /pathway/filename

but of course I am not thinking I need some set?

2) possible /opt is root:staff rwx rws r-x
but I am not sure about anything

I did look at the archectural diagram but thats not designed to detail setuids (if any needed)

thanks for reading

########## trivia

TC still boots
but no startx command

This may well be just a simple permission issue but I need to eliminate setuid first if possible as that is what I did

sorry about that

signed  idiot of the Feb month

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: what files/folders for TCB with persistence----- need setuid set?
« Reply #1 on: February 01, 2013, 05:21:54 AM »
I have a heap of downloaded TCZs so would prefer to recover the situation that have to start again if possible
Here's a thought:
For recovery purposes recursively copy your entire tce dir to a vfat partition.
As vfat inherently lacks any capability of setting ownership and permission attributes, latter will just poof in the copy process.
This might possibly help distinguish issues, having to deal then only with /home and /opt, but leaving tce dir out of the equation.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

aus9

  • Guest
Re: what files/folders for TCB with persistence----- need setuid set?
« Reply #2 on: February 01, 2013, 10:00:45 AM »
well the hard drive install for tce won't go onto a usb format unless I use a usb stick

but I have an usb install booted as I type and here are a few ls -al results

any clues to setuid?
Code: [Select]
tc@box:~$ ls -al /home
total 8
drwxr-xr-x  3 root root  4096 Jan 28 16:45 ./
drwxrwxr-x 17 root staff  360 Dec 21 23:29 ../
drwxr-s--- 14 tc   staff 4096 Feb  1 22:47 tc/
tc@box:~$ ls -al /home/tc
total 464
drwxr-s--- 14 tc   staff   4096 Feb  1 22:47 ./
drwxr-xr-x  3 root root    4096 Jan 28 16:45 ../
drwxr-xr-x  2 tc   staff   4096 Apr 22  2010 .X.d/
-rw-------  1 tc   staff     97 Jan 31 19:54 .Xauthority
-rwxr-xr-x  1 tc   staff    275 Jan 28 16:45 .Xdefaults
-rw-rw-r--  1 tc   staff   4750 Feb  1 22:53 .ash_history
-rw-rw-r--  1 tc   staff    272 Mar  5  2010 .ashrc
-rw-r--r--  1 tc   staff     29 Feb 21  2010 .bashrc
drwx--S---  4 tc   staff   4096 Feb  1 22:47 .cache/
drwx--S--- 14 tc   staff   4096 Jan 28 18:49 .config/
drwx--S---  3 tc   staff   4096 Jan 28 17:52 .dbus/
drwxr-xr-x  3 tc   staff   4096 Mar  5  2010 .fltk/
drwxr-xr-x  2 tc   staff   4096 Jan 28 17:53 .fontconfig/
-rw-r--r--  1 tc   staff     63 Jan 30 09:57 .gtk-bookmarks
-rw-r--r--  1 tc   staff    255 Jan 28 17:15 .gtkrc-2.0
drwxr-sr-x  4 tc   staff   4096 Jan 28 17:15 .local/
drwxr-sr-x  2 tc   staff   4096 Jan 28 18:11 .pepper/
drwx--S---  3 tc   staff   4096 Jan 28 17:17 .pki/
-rw-rw-r--  1 tc   staff    966 Aug 16 06:59 .profile
-rwxr-xr-x  1 tc   staff    103 Jan 28 16:45 .setbackground
drwx--S---  4 tc   staff   4096 Jan 28 17:52 .thumbnails/
lrwxrwxrwx  1 tc   staff     20 Jan 30 18:35 .wbar -> /usr/local/tce.icons
-rwxr-xr-x  1 tc   staff    422 Jan 28 16:45 .xsession
-rwxrwxrwx  1 tc   staff 215985 Oct  9  2011 3d.jpeg
drwxr-sr-x  2 tc   staff   4096 Jan 29 08:55 Desktop/
drwx--S---  2 tc   staff   4096 Jan 30 11:51 Downloads/
-rw-------  1 tc   staff 145583 Jan 26 08:09 bookmarks.html

Code: [Select]
ls -al /opt
total 40
drwxrwsr-x  4 root staff 4096 Nov  6  2011 ./
drwxrwxr-x 17 root staff  360 Dec 21 23:29 ../
-rw-rw-r--  1 tc   staff   23 Jan 31 08:29 .appbrowser
-rw-rw-r--  1 tc   staff   27 Jan 31 09:20 .filetool.lst
-rw-rw-r--  1 root staff  145 Dec 16  2011 .xfiletool.lst
drwxrwsr-x  2 root staff 4096 Jan 28 17:11 alsa/
drwxrwsr-x  2 root staff 4096 Jan 28 16:45 backgrounds/
-rwxrwxr-x  1 root staff  124 Jan 29 16:59 bootlocal.sh
-rwxrwxr-x  1 root staff  272 Mar 16  2011 bootsync.sh
-rwxrwxr-x  1 root staff  566 Jun 14  2010 shutdown.sh
-rw-rw-r--  1 root staff   31 Dec 16 00:35 tcemirror

persistence for usb stick is here
Code: [Select]
ls -al /mnt/sdb1
total 24
drwxr-xr-x  7 root root  4096 Jan 31 07:27 ./
drwxrwxr-x  6 root staff  120 Feb  1 22:47 ../
drwxr-sr-x 20 tc   staff 4096 Jan 31 09:03 TCZS/
drwxr-xr-x  3 tc   staff 4096 Jan 30 18:30 boot/
drwxr-xr-x  3 root root  4096 Jan 28 16:45 home/
drwxrwsr-x  4 root staff 4096 Nov  6  2011 opt/
drwxrwxr-x  4 tc   staff 4096 Jan 29 14:44 tce/

Code: [Select]
ls -al /mnt/sdb1/tce
total 33760
drwxrwxr-x 4 tc   staff     4096 Jan 29 14:44 ./
drwxr-xr-x 7 root root      4096 Jan 31 07:27 ../
-rw-rw---- 1 tc   staff        0 Jan 28 16:46 firstrun
-rw-rw-r-- 1 tc   staff      655 Jan 31 09:20 mydata.tgz
-rw-rw-r-- 1 tc   staff      152 Feb  1 22:47 onboot.lst
drwxrwxr-x 2 tc   staff     4096 Jan 28 18:18 ondemand/
drwxrwxr-x 2 tc   staff    16384 Jan 31 08:42 optional/
-rw--w---- 1 tc   staff 34490808 Jan 28 22:18 provides.db
-rw-rw-r-- 1 tc   staff        0 Jan 28 16:45 xwbar.lst

maybe I should try to match the setuids using this usb install, as I removed them from the internal hard drive?

will probably do that as nothing to lose

trivia the folder called TCZs are just backup build area not used by system

cheers

aus9

  • Guest
Re: what files/folders for TCB with persistence----- need setuid set?
« Reply #3 on: February 01, 2013, 10:05:55 AM »
I may be anal, but some of the dots (,) have setuid set

aus9

  • Guest
Re: what files/folders for TCB with persistence----- need setuid set?
« Reply #4 on: February 01, 2013, 10:13:09 AM »
ok modified a google command to find the group setuid, as my above folders don't have user
Code: [Select]
sudo find / -perm +g=s


obviously it will depend on what tczs you have loaded but it would be nice to know if some have the same matches in the home folder etc

The below results are for a working usb stick boot up and not the internal drive fail.
Code: [Select]
/tmp/tcloop/ntfs-3g/usr/local/bin/ntfs-3g
/tmp/tcloop/bash
/tmp/tcloop/libvorbis
/tmp/tcloop/libvorbis/usr
/tmp/tcloop/libvorbis/usr/local
/tmp/tcloop/libogg
/tmp/tcloop/libogg/usr
/tmp/tcloop/libogg/usr/local
/tmp/tcloop/faac/usr
/tmp/tcloop/faac/usr/local
/tmp/tcloop/faac/usr/local/bin
/tmp/tcloop/faac/usr/local/lib
/tmp/tcloop/alsa/usr/local/tce.installed
/tmp/tcloop/vte/usr/local/libexec/gnome-pty-helper
/tmp/tcloop/LXDE2/usr/local/etc/xdg/lxsession/LXDE
/tmp/tcloop/LXDE2/usr/local/share/lxde/libfm
/tmp/tcloop/LXDE2/usr/local/share/lxpanel/profile/LXDE/panels
/tmp/tcloop/openbox
/tmp/tcloop/graphics-libs-1/usr
/tmp/tcloop/graphics-libs-1/usr/local
/tmp/tcloop/graphics-libs-1/usr/local/bin
/tmp/tcloop/graphics-libs-1/usr/local/lib
/home/tc
/home/tc/.pepper
/home/tc/.local
/home/tc/.local/bin
/home/tc/.local/share
/home/tc/.local/share/mc
/home/tc/.local/share/mc/mcedit
/home/tc/.local/share/vlc
/home/tc/.local/share/applications
/home/tc/.local/share/openbox
/home/tc/.local/share/openbox/sessions
/home/tc/Desktop
/home/tc/.thumbnails
/home/tc/.thumbnails/large
/home/tc/.thumbnails/large/00000000000000000000000000000000.png
/home/tc/.thumbnails/normal/00000000000000000000000000000000.png
/home/tc/.config
/home/tc/.config/lxterminal
/home/tc/.config/chromium
/home/tc/.config/chromium/Default
/home/tc/.config/chromium/Default/Pepper Data
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/thejigsawpuzzles.com
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/thejigsawpuzzles.com/flash
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/thejigsawpuzzles.com/flash/puzzle_20121101.swf
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/macromedia.com
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/macromedia.com/support
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/macromedia.com/support/flashplayer
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/macromedia.com/support/flashplayer/sys
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/CacheWritableAdobeRoot
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/CacheWritableAdobeRoot/AssetCache
/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/CacheWritableAdobeRoot/AssetCache/WG5FHPP4
/home/tc/.config/chromium/Default/User StyleSheets
/home/tc/.config/chromium/Default/Local Storage
/home/tc/.config/chromium/Default/Session Storage
/home/tc/.config/chromium/Default/Extension State
/home/tc/.config/chromium/Dictionaries
/home/tc/.config/mc
/home/tc/.config/mc/mcedit
/home/tc/.config/libfm
/home/tc/.config/lxsession
/home/tc/.config/lxsession/LXDE
/home/tc/.config/pcmanfm
/home/tc/.config/pcmanfm/default
/home/tc/.config/lxpanel
/home/tc/.config/lxpanel/LXDE/panels
/home/tc/.config/vlc
/home/tc/.config/spacefm
/home/tc/.config/menus
/home/tc/.config/openbox
/home/tc/.config/leafpad
/home/tc/.dbus
/home/tc/.dbus/session-bus
/home/tc/.cache
/home/tc/.cache/chromium
/home/tc/.cache/chromium/Default
/home/tc/.cache/chromium/Default/Cache
/home/tc/.cache/menus
/home/tc/Downloads
/home/tc/.pki
/home/tc/.pki/nssdb
/mnt/sdb1/TCZS
/mnt/sdb1/TCZS/udiskie-0.4.1
/mnt/sdb1/TCZS/udiskie-0.4.1/udiskie
/mnt/sdb1/TCZS/udiskie-0.4.1/where2_files
/mnt/sdb1/TCZS/udiskie-0.4.1/bin
/mnt/sdb1/TCZS/udiskie-0.4.1/doc
/mnt/sdb1/TCZS/inxi
/mnt/sdb1/TCZS/lm_sensors-3.3.3
/mnt/sdb1/TCZS/lilyterm-0.9.9.2
/mnt/sdb1/TCZS/aspell-dicts
/mnt/sdb1/TCZS/weechat-plugins
/mnt/sdb1/TCZS/guvcview-src-1.6.1
/mnt/sdb1/TCZS/aspell-0.60.6.1
/mnt/sdb1/TCZS/libva
/mnt/sdb1/home/tc
/mnt/sdb1/home/tc/.pepper
/mnt/sdb1/home/tc/.local
/mnt/sdb1/home/tc/.local/bin
/mnt/sdb1/home/tc/.local/share
/mnt/sdb1/home/tc/.local/share/mc
/mnt/sdb1/home/tc/.local/share/mc/mcedit
/mnt/sdb1/home/tc/.local/share/vlc
/mnt/sdb1/home/tc/.local/share/applications
/mnt/sdb1/home/tc/.local/share/openbox
/mnt/sdb1/home/tc/.local/share/openbox/sessions
/mnt/sdb1/home/tc/Desktop
/mnt/sdb1/home/tc/.thumbnails
/mnt/sdb1/home/tc/.thumbnails/large
/mnt/sdb1/home/tc/.thumbnails/large/00000000000000000000000000000000.png
/mnt/sdb1/home/tc/.thumbnails/normal/00000000000000000000000000000000.png
/mnt/sdb1/home/tc/.config
/mnt/sdb1/home/tc/.config/lxterminal
/mnt/sdb1/home/tc/.config/chromium
/mnt/sdb1/home/tc/.config/chromium/Default
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/thejigsawpuzzles.com
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/thejigsawpuzzles.com/flash
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/thejigsawpuzzles.com/flash/puzzle_20121101.swf
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/macromedia.com
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/macromedia.com/support
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/macromedia.com/support/flashplayer
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/WritableRoot/#SharedObjects/XFS788NP/macromedia.com/support/flashplayer/sys
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/CacheWritableAdobeRoot
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/CacheWritableAdobeRoot/AssetCache
/mnt/sdb1/home/tc/.config/chromium/Default/Pepper Data/Shockwave Flash/CacheWritableAdobeRoot/AssetCache/WG5FHPP4
/mnt/sdb1/home/tc/.config/chromium/Default/User StyleSheets
/mnt/sdb1/home/tc/.config/chromium/Default/Local Storage
/mnt/sdb1/home/tc/.config/chromium/Default/Session Storage
/mnt/sdb1/home/tc/.config/chromium/Default/Extension State
/mnt/sdb1/home/tc/.config/chromium/Dictionaries
/mnt/sdb1/home/tc/.config/mc
/mnt/sdb1/home/tc/.config/mc/mcedit
/mnt/sdb1/home/tc/.config/libfm
/mnt/sdb1/home/tc/.config/lxsession
/mnt/sdb1/home/tc/.config/lxsession/LXDE
/mnt/sdb1/home/tc/.config/pcmanfm
/mnt/sdb1/home/tc/.config/pcmanfm/default
/mnt/sdb1/home/tc/.config/lxpanel
/mnt/sdb1/home/tc/.config/lxpanel/LXDE/panels
/mnt/sdb1/home/tc/.config/vlc
/mnt/sdb1/home/tc/.config/spacefm
/mnt/sdb1/home/tc/.config/menus
/mnt/sdb1/home/tc/.config/openbox
/mnt/sdb1/home/tc/.config/leafpad
/mnt/sdb1/home/tc/.dbus
/mnt/sdb1/home/tc/.dbus/session-bus
/mnt/sdb1/home/tc/.cache
/mnt/sdb1/home/tc/.cache/chromium
/mnt/sdb1/home/tc/.cache/chromium/Default
/mnt/sdb1/home/tc/.cache/chromium/Default/Cache
/mnt/sdb1/home/tc/.cache/menus
/mnt/sdb1/home/tc/Downloads
/mnt/sdb1/home/tc/.pki
/mnt/sdb1/home/tc/.pki/nssdb
/mnt/sdb1/opt
/mnt/sdb1/opt/backgrounds
/mnt/sdb1/opt/alsa
/usr/local/etc/xdg/lxsession/LXDE
/usr/local/share/lxde/libfm
/usr/local/share/lxpanel/profile/LXDE/panels
/opt
/opt/backgrounds
/opt/alsa
/var/spool/lpd

aus9

  • Guest
Re: what files/folders for TCB with persistence----- need setuid set?
« Reply #5 on: February 01, 2013, 10:18:08 PM »
ok the question still remains
--what setuids need to be set

but being impatient I just copied the flash drive stuff onto the hard drive and modified my bootloader

so at this stage won't mark as solved

cheer