Sponsored Content
Full Discussion: Permissions on /bin
Top Forums UNIX for Advanced & Expert Users Permissions on /bin Post 33456 by Kelam_Magnus on Monday 6th of January 2003 02:18:52 PM
Old 01-06-2003
You may have a bigger problem here

If you really typed:

chmod 777 /bin/* this is very bad. You have changed the permissions on many stickybit commands. Here is a list from my HPUX box.

You may have screwed up your links and stickybits. Many files in bin are linked to /etc, /usr, and /opt, and sometimes your $PATH looks first in these dirs instead of /bin. I had a similar prob on a box where someone executed chmod 444 on /bin VERY HORRIBLE hehe...


Try to use this list to reconstruct your system from my list or find a list for your OS.

See to lists below.

# ll |grep "\-s"
-r-sr-xr-x 1 root bin 53248 Jun 18 2002 at
-r-sr-xr-x 1 root bin 24576 Jan 10 2001 bdf
-r-sr-xr-x 1 lp bin 45056 Jul 26 04:13 cancel
-r-sr-xr-x 1 root bin 49152 Nov 6 1997 chkey
-r-sr-xr-x 1 root bin 32768 Jun 18 2002 crontab
-r-sr-xr-x 1 root bin 53248 Apr 9 1998 ct
-r-sr-xr-x 1 root bin 40960 Feb 14 2001 cu
-r-sr-xr-x 1 root bin 77824 Jan 11 2001 df
-r-sr-xr-x 1 lp bin 28672 Jul 26 04:13 disable
-r-xr-sr-x 1 bin mail 487424 Mar 14 2001 elm
-r-sr-xr-x 1 lp bin 24576 Jul 26 04:13 enable
-r-xr-sr-x 1 bin sys 20480 Jul 17 2000 iostat
-r-xr-sr-x 1 bin sys 28672 Apr 23 1999 ipcs
-r-sr-sr-x 1 bin daemon 720896 Dec 7 2000 kermit
-r-sr-xr-x 1 root bin 57344 Nov 15 2001 login
-r-sr-xr-x 1 root bin 49152 Jul 26 04:13 lp
-r-sr-xr-x 1 root bin 40960 Jul 26 04:13 lpalt
-r-sr-xr-x 1 root bin 65536 Oct 20 1999 mediainit
-rwsr-sr-x 2 root mail 45056 Nov 7 1997 mail
-r-sr-xr-x 1 root bin 65536 Oct 20 1999 mediainit
-r-xr-sr-x 1 bin sys 131072 Jan 28 1999 netstat
-r-sr-xr-x 1 root bin 20480 Apr 2 2002 newgrp
-r-sr-xr-x 1 root bin 28672 Jun 27 2002 nfsstat
-r-xr-sr-x 1 bin sys 20480 Nov 20 2000 pipcs
-r-sr-xr-x 1 root bin 319488 Jun 9 1998 pppd
-r-sr-xr-x 1 root bin 49152 Nov 7 2001 rcp
-r-sr-xr-x 1 root bin 73728 Nov 7 2001 rdist
-r-sr-xr-x 1 root bin 32768 Nov 7 2001 remsh
-r-sr-xr-x 1 root bin 24576 Nov 7 2001 rexec
-r-sr-xr-x 1 root bin 45056 Nov 7 2001 rlogin
-rwsr-sr-x 2 root mail 45056 Nov 7 1997 rmail
-r-sr-xr-x 1 lp bin 16384 Oct 27 1997 slp
-r-xr-sr-x 1 bin bin 245760 Nov 2 1997 stmkfont
-r-s--x--x 1 root sys 65720 Jul 20 07:45 su
-r-xr-sr-x 1 bin sys 36864 Feb 7 2002 top
-r-xr-sr-x 2 bin sys 20480 Aug 24 2001 uptime
-r-sr-xr-x 1 uucp bin 57344 Aug 1 2001 uucp
-r-sr-xr-x 1 uucp bin 24576 Oct 27 1997 uuls
-r-sr-xr-x 1 uucp bin 16384 Oct 27 1997 uuname
-r-sr-xr-x 1 uucp bin 20480 Oct 27 1997 uusnap
-r-sr-xr-x 1 uucp bin 40960 Oct 27 1997 uustat
-r-sr-xr-x 1 uucp bin 61440 Aug 1 2001 uux
-r-xr-sr-x 1 bin sys 28672 Jul 18 2000 vmstat
-r-xr-sr-x 2 bin sys 20480 Aug 24 2001 w

# ll |grep "\-t"
lrwxr-xr-t 1 root sys 21 Jan 15 2002 acl_edit -> /opt/dce/t
lrwxr-xr-t 1 root sys 15 Jan 15 2002 ar -> /usr/ccs/bin/ar
lrwxr-xr-t 1 root sys 18 Jan 15 2002 audevent -> /usr/sbint
lrwxr-xr-t 1 root sys 16 Jan 15 2002 audisp -> /usr/sbin/ap
lrwxr-xr-t 1 root sys 16 Jan 15 2002 audsys -> /usr/sbin/as
lrwxr-xr-t 1 root sys 16 Jan 15 2002 audusr -> /usr/sbin/ar
lrwxr-xr-t 1 root sys 20 Jan 15 2002 bfs -> /usr/old/usr/bs
lrwxr-xr-t 1 root sys 15 Jan 15 2002 cc -> /usr/ccs/bin/cc
lrwxr-xr-t 1 root sys 20 Jan 15 2002 cdsadv -> /opt/dce/sbv
lrwxr-xr-t 1 root sys 22 Jan 15 2002 cdsclerk -> /opt/dce/k
lrwxr-xr-t 1 root sys 18 Jan 15 2002 cdscp -> /opt/dce/binp
lrwxr-xr-t 1 root sys 18 Jan 15 2002 chatr -> /usr/ccs/binr
lrwxr-xr-t 1 root sys 18 Jan 15 2002 ctags -> /usr/ccs/bins
lrwxr-xr-t 1 root sys 18 Jan 15 2002 cuegetty -> /usr/sbiny
lrwxr-xr-t 1 root sys 22 Jan 15 2002 dce_login -> /opt/dcen
lrwxr-xr-t 1 root sys 30 Jan 15 2002 dts_ntp_provider -> /r
lrwxr-xr-t 1 root sys 31 Jan 15 2002 dts_null_provider -> r
lrwxr-xr-t 1 root sys 18 Jan 15 2002 dtscp -> /opt/dce/binp
lrwxr-xr-t 1 root sys 18 Jan 15 2002 dtsd -> /opt/dce/sbind
lrwxr-xr-t 1 root sys 16 Jan 15 2002 dumpfs -> /usr/sbin/ds
-r-xr-xr-t 6 bin bin 249856 Mar 31 2002 e
-r-xr-xr-t 6 bin bin 249856 Mar 31 2002 edit
-r-xr-xr-t 6 bin bin 249856 Mar 31 2002 ex
lrwxr-xr-t 1 root sys 16 Jan 15 2002 fdp -> /usr/ccs/bin/fp
lrwxr-xr-t 1 root sys 16 Jan 15 2002 fixman -> /usr/sbin/fn
lrwxr-xr-t 1 root sys 24 Jan 15 2002 getcellname -> /opt/de
lrwxr-xr-t 1 root sys 18 Jan 15 2002 getip -> /opt/dce/binp
lrwxr-xr-t 1 root sys 18 Jan 15 2002 gprof -> /usr/ccs/binf
lrwxr-xr-t 1 root sys 17 Jan 15 2002 help -> /usr/bin/sccsp
lrwxr-xr-t 1 root sys 24 Jan 15 2002 hosts_to_named -> /usd
lrwxr-xr-t 1 root sys 21 Jan 15 2002 kdestroy -> /opt/dce/y
lrwxr-xr-t 1 root sys 18 Jan 15 2002 kinit -> /opt/dce/bint
lrwxr-xr-t 1 root sys 18 Jan 15 2002 klist -> /opt/dce/bint
lrwxr-xr-t 1 root sys 17 Jan 15 2002 landiag -> /usr/sbin/g
lrwxr-xr-t 1 root sys 15 Jan 15 2002 ld -> /usr/ccs/bin/ld
lrwxr-xr-t 1 root sys 19 Jan 15 2002 lorder -> /usr/ccs/bir
lrwxr-xr-t 1 root sys 15 Jan 15 2002 m4 -> /usr/ccs/bin/m4
lrwxr-xr-t 1 root sys 19 Jan 15 2002 mailstats -> /usr/sbis
lrwxr-xr-t 1 root sys 17 Jan 15 2002 make -> /usr/ccs/bin/e
lrwxr-xr-t 1 root sys 17 Jan 15 2002 mkmf -> /usr/ccs/bin/f
lrwxr-xr-t 1 root sys 22 Jan 15 2002 mkpdf -> /usr/old/usrf
lrwxr-xr-t 1 root sys 18 Jan 15 2002 mkstr -> /usr/ccs/binr
lrwxr-xr-t 1 root sys 20 Jan 15 2002 newaliases -> /usr/sbs
lrwxr-xr-t 1 root sys 15 Jan 15 2002 nm -> /usr/ccs/bin/nm
lrwxr-xr-t 1 root sys 26 Jan 15 2002 passwd_export -> /optt
lrwxr-xr-t 1 root sys 26 Jan 15 2002 passwd_import -> /optt
lrwxr-xr-t 1 root sys 22 Jan 15 2002 pdfck -> /usr/old/usrk
lrwxr-xr-t 1 root sys 24 Jan 15 2002 pdfdiff -> /usr/old/uf
lrwxr-xr-t 1 root sys 22 Jan 15 2002 pdfpr -> /usr/old/usrr
lrwxr-xr-t 1 root sys 17 Jan 15 2002 prof -> /usr/ccs/bin/f
lrwxr-xr-t 1 root sys 19 Jan 15 2002 ranlib -> /usr/ccs/bib
lrwxr-xr-t 1 root sys 16 Jan 15 2002 renice -> /usr/sbin/re
lrwxr-xr-t 1 root sys 22 Jan 15 2002 revck -> /usr/old/usrk
lrwxr-xr-t 1 root sys 21 Jan 15 2002 rgy_edit -> /opt/dce/t
lrwxr-xr-t 1 root sys 18 Jan 15 2002 rpccp -> /opt/dce/binp
lrwxr-xr-t 1 root sys 18 Jan 15 2002 rpcd -> /opt/dce/sbind
lrwxr-xr-t 1 root sys 14 Jan 15 2002 sadp -> /usr/sbin/sadp
lrwxr-xr-t 1 root sys 13 Jan 15 2002 sar -> /usr/sbin/sar
lrwxr-xr-t 1 root sys 22 Jan 15 2002 sec_admin -> /opt/dcen
lrwxr-xr-t 1 root sys 25 Jan 15 2002 sec_clientd -> /opt/dd
lrwxr-xr-t 1 root sys 19 Jan 15 2002 sig_named -> /usr/sbid
lrwxr-xr-t 1 root sys 17 Jan 15 2002 size -> /usr/ccs/bin/e
lrwxr-xr-t 1 root sys 19 Jan 15 2002 stcode -> /opt/dce/bie
lrwxr-xr-t 1 root sys 20 Jan 15 2002 strings -> /usr/ccs/bs
lrwxr-xr-t 1 root sys 18 Jan 15 2002 strip -> /usr/ccs/binp
lrwxr-xr-t 1 root sys 14 Jan 15 2002 sync -> /usr/sbin/sync
lrwxr-xr-t 1 root sys 18 Jan 15 2002 tsort -> /usr/ccs/bint
lrwxr-xr-t 1 root sys 20 Jan 15 2002 uuidgen -> /opt/dce/bn
-r-xr-xr-t 6 bin bin 249856 Mar 31 2002 vedit
-r-xr-xr-t 6 bin bin 249856 Mar 31 2002 vi
-r-xr-xr-t 6 bin bin 249856 Mar 31 2002 view
lrwxr-xr-t 1 root sys 14 Jan 15 2002 vipw -> /usr/sbin/vipw
lrwxr-xr-t 1 root sys 17 Jan 15 2002 xstr -> /usr/ccs/bin/r
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies

2. UNIX for Dummies Questions & Answers

Difference between /bin, /usr/bin, /sbin ?

Hi All, Can somebody tell me the difference between /bin, /usr/bin, /sbin ? Thanx in advance, Saneesh Joseph (3 Replies)
Discussion started by: saneeshjose
3 Replies

3. AIX

bin group strange permissions

I was doing a little playing around with permissions on a 5.3 box in the office and wanted to make it so that it does not take root permission to delete a users home directory once they are deactivated or deleted in smit. the default permissions are 755 with bin as both user and group I noticed... (2 Replies)
Discussion started by: dgaixsysadm
2 Replies

4. Shell Programming and Scripting

Why does my /bin/csh take longer than /bin/perl?

Okay, so I have two "Hello, world!" scripts, "test.pl" and "test.sh". #!/bin/perl -w use strict; print "Hello, world!\n"; #!/bin/csh echo Hello,\ world! When I run test.pl, it runs instantly, always. When I run test.sh, it takes anywhere between 4 and 22 seconds! I'd like to know what... (3 Replies)
Discussion started by: acheong87
3 Replies

5. UNIX for Dummies Questions & Answers

fuser: difference with bin/sh and bin/ksh shell script

Hi, I have a problem I don't understand with fuser. I launch a simple shell script mysleep.sh: I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted: mysleep: Then I modify my script switching from #!/bin/sh to #!/bin/ksh I launch the command fuser -fu... (4 Replies)
Discussion started by: Peuj
4 Replies

6. UNIX for Dummies Questions & Answers

Alias /usr/bin to /bin in profile

Hi! All the basic linux commands, ie. echo, find, etc, are located in /bin. I have a couple of programs that have these commands pointed towards /usr/bin, ie, /usr/bin/echo (even though the actual 'echo' command is in /bin). How can I alias or redirect or link the /usr/bin to /bin just for this... (6 Replies)
Discussion started by: dancerat
6 Replies

7. OS X (Apple)

When to use /Users/m/bin instead of /usr/local/bin (& whats the diff?)?

Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself. But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies

8. Solaris

What is the difference between xpg4/bin and usr/bin?

Hi Experts, I found that the same commands(sort, du, df, find, grep etc.) exists in both dir. What is the difference to use them? i.e: to use xpg4/bin/grep and usr/bin/grep My OS version is SunOS 5.10 Regards, Saps (7 Replies)
Discussion started by: saps19
7 Replies

9. AIX

Redistribution bin required for AIX. j7r164redist.7.1.0.25.bin

Hi, I am planning to install a version of Informatica on my AIX box. It requires a specific java build in pap6470_27sr2-20141101_01(SR2). The current link for IBM 64-bit SDK for AIX®, JavaTM Technology Edition, Version 7 Release 1 has a more recent version in j7r164redist.7.1.0.75.bin. Is... (4 Replies)
Discussion started by: meetpraveens
4 Replies

10. Shell Programming and Scripting

Usage of #!/bin/sh vs #!/bin/bash shell scripts?

Some question about the usage of shell scripts: 1.) Are the commands of the base shell scripts a subset of bash commands? 2.) Assume I got a long, long script WITHOUT the first line. How can I find out if the script was originally designed für "sh" or "bash"? 3.) How can I check a given... (3 Replies)
Discussion started by: pstein
3 Replies
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy