Hi
pre-amble....I am a simple coder and probably a slow learner?
before I ask my questions, I already know the following works for me
In building TCZs, some packages need special owner or permissions. Altho I have some things in my build script, I want to check the build folder quickly and these work so far. Changed pathway to a real package
sudo find /tmp/tcloop/cups -perm 640
/tmp/tcloop/cups/usr/local/etc/cups/snmp.conf
/tmp/tcloop/cups/usr/local/share/cups/files/cupsd.conf
sudo find /tmp/tcloop/cups ! -user root ! -group root
/tmp/tcloop/cups
/tmp/tcloop/cups/usr/local/tce.installed/cups
find -h --> gives some references and one section is:
-type X File type is X (one of: f,d,l,b,c,...)
google gives me
http://www.tuxradar.com/content/find-files-easy-wayFile is of type 'x', one of:
f - regular file d - directory l - symbolic link c - character device b - block device p - named pipe (FIFO)
Now if I did not know the octal number was 640, I can see that
ls -al /tmp/tcloop/cups/usr/local/share/cups/files/cupsd.conf
-rw-r----- 1 root root 4141 Oct 12 2011 /tmp/tcloop/cups/usr/local/share/cups/files/cupsd.conf
(so attempt)
sudo find /tmp/tcloop/cups -perm -rw-r-----
find: invalid mode 'rw-r-----'
(attempt 2)
sudo find /tmp/tcloop/cups -perm rw-r-----
find: invalid mode 'rw-r-----'
Now to look for setuid...google suggests
http://linux-windowsfixes.blogspot.com.au/2012/06/how-to-find-setuid-setgid-files.htmlsudo find / -type f \( -perm -04000 \) \-exec ls -lg {} \;
-rwsr-xr-x 1 root 15828 Oct 28 2011 /tmp/tcloop/polkit/usr/local/bin/pkexec
-rwsr-xr-x 1 root 8232 Oct 28 2011 /tmp/tcloop/polkit/usr/local/libexec/polkit-agent-helper-1
-rwsr-xr-x 1 root 9403 Oct 28 2011 /tmp/tcloop/Linux-PAM/usr/local/sbin/pam_timestamp_check
-rwsr-xr-x 1 root 26057 Oct 28 2011 /tmp/tcloop/Linux-PAM/usr/local/sbin/unix_chkpwd
-rwsr-sr-x 1 root 43224 Aug 1 2011 /tmp/tcloop/ntfs-3g/usr/local/bin/ntfs-3g
-rwsr-xr-x 1 root 69212 Sep 5 2011 /tmp/tcloop/util-linux/usr/local/bin/mount
-rwsr-xr-x 1 root 49884 Sep 5 2011 /tmp/tcloop/util-linux/usr/local/bin/umount
-rwsr-xr-x 1 root 10972 Nov 9 11:22 /tmp/tcloop/chromium-browser/usr/local/chromium-browser/chromium-browser-sandbox
-rwsr-xr-x 1 root 208232 Jul 28 2012 /tmp/tcloop/dbus/usr/local/libexec/dbus-daemon-launch-helper
-rwsr-xr-x 1 root 1341528 Sep 23 2011 /tmp/tcloop/Xorg-7.6/usr/local/bin/Xorg
-rwsrwxr-x 1 staff 511220 Aug 8 2012 /bin/busybox
---s-wx--x 1 staff 127144 Dec 8 2011 /usr/bin/sudo
setgid could use
sudo find / -type f \( -perm -02000 \) \-exec ls -lg {} \;
-rwsr-sr-x 1 root 43224 Aug 1 2011 /tmp/tcloop/ntfs-3g/usr/local/bin/ntfs-3g
-rwxr-sr-x 1 root 8864 Sep 1 2011 /tmp/tcloop/vte/usr/local/libexec/gnome-pty-helper
for lower case t I can see that chmod can be used to set the t either
(setuid)
chmod u+t
(setgid)
chmod g+t
(whatever others is called
chmod o+t
Questions1) What am I doing wrong in my failed (attempt) attempts?
2) How do you set perm rw- r -- --T ?
The closest I have got thru google is
http://aplawrence.com/Basics/perms.htmlnot bad for t but not sure its showing T
3) What is its octal number?
Thanks for reading and thanks for any enlightenment