WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: "which"  (Read 2492 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
"which"
« on: July 19, 2009, 11:03:41 AM »
..doesn't show links to /tmp/tcloop  that are in PATH, like for OSS commands in /usr/sbin. I'm not sure why, since it shows other links. 

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: "which"
« Reply #1 on: July 19, 2009, 12:30:42 PM »
'which' does not report on files that you do not have the proper permission.

If you look at the files in /tmp/tcloop/OSS/usr/sbin you will find:

-rwx------    1 root     root        10688 Dec 31  1969 ossdetect
-rwx------    1 root     root        11000 Dec 31  1969 ossdevlinks
-rwx------    1 root     root         9908 Dec 31  1969 ossvermagic
-rwx------    1 root     root        10456 Dec 31  1969 savemixer
-rwx------    1 root     root         1244 Dec 31  1969 soundoff
-rwx------    1 root     root         7464 Dec 31  1969 soundon
-rwx------    1 root     root         5756 Dec 31  1969 vmixctl

As a regular user, you do not have persmission to use and thus 'which' does not report.

Using sudo which soundon will report /usr/sbin/soundon
10+ Years Contributing to Linux Open Source Projects.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: "which"
« Reply #2 on: July 19, 2009, 01:01:29 PM »
I had thought of that,   and changed the permission for the link, which still doesn't work.  (there's no way to change the permission for the linked file in /tmp/tcloop).  

edit: Oh...."sudo which" works  :)

Think I'll create an alias....
« Last Edit: July 19, 2009, 01:16:15 PM by jpeters »