Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: /usr/bin/instmodsh: Permission denied.

by rnaeye (Pilgrim)
on May 23, 2010 at 14:53 UTC ( #841258=note: print w/ replies, xml ) Need Help??


in reply to Re: /usr/bin/instmodsh: Permission denied.
in thread /usr/bin/instmodsh: Permission denied.

Hi! All,

Thank for trying to help. No offense taken. I am a biologist and my Perl knowledge is limited to the book "Learning Perl", and have minimal Unix knowledge, which you can already tell from my question.

I am using MacOS 10.6.3 Terminal with Perl Version v5.10.0.

Terminal Shell is "tcsh".

File permission at top directory:

[yigite:/] rnaeye% ls -l total 36500 drwxrwxr-x+ 90 root admin 3060 May 22 15:27 Applications drwxrwxrwx@ 8 501 admin 272 Dec 15 2003 Conversion Progra +ms drwxr-xr-x@ 10 rnaeye rnaeye 340 Mar 9 2006 Desktop Folder drwxrwxr-x@ 19 root admin 646 May 22 20:17 Developer drwxr-xr-x@ 6 rnaeye rnaeye 204 Jan 11 2008 Documents drwxrwxr-t+ 65 root admin 2210 May 8 16:45 Library drwxr-xr-x@ 2 root wheel 68 Feb 10 22:43 Network drwxr-xr-x 4 root wheel 136 May 8 14:24 System lrwxr-xr-x 1 root admin 60 May 7 18:29 User Guides And I +nformation -> /Library/Documentation/User Guides and Information.loca +lized lrwxr-xr-x 1 root admin 60 Sep 9 2008 User Guides And I +nformation (from old Mac) -> /Library/Documentation/User Guides and I +nformation.localized drwxr-xr-x 7 root admin 238 May 19 16:38 Users drwxrwxrwt@ 3 root admin 102 May 22 20:23 Volumes drwxr-xr-x@ 39 root wheel 1326 May 8 14:23 bin drwxrwxr-t@ 2 root admin 68 Feb 10 22:43 cores dr-xr-xr-x 3 root wheel 4079 May 22 20:22 dev lrwxr-xr-x@ 1 root wheel 11 May 8 14:23 etc -> private/et +c dr-xr-xr-x 2 root wheel 1 May 22 20:23 home -rw-r--r--@ 1 root wheel 18659362 Feb 26 13:59 mach_kernel dr-xr-xr-x 2 root wheel 1 May 22 20:23 net drwxr-xr-x@ 7 root wheel 238 May 8 16:18 private drwxr-xr-x@ 64 root wheel 2176 May 8 14:24 sbin lrwxr-xr-x@ 1 root wheel 11 May 8 14:23 tmp -> private/tm +p drwxr-xr-x@ 14 root wheel 476 May 22 20:20 usr lrwxr-xr-x@ 1 root wheel 11 May 8 14:23 var -> private/va +r

File permissions at yigite:/usr rnaeye%:

[yigite:/usr] rnaeye% ls -l total 8 drwxr-xr-x 8 root wheel 272 May 8 14:31 X11 lrwxr-xr-x 1 root wheel 3 May 8 14:31 X11R6 -> X11 drwxr-xr-x 1090 root wheel 37060 May 22 20:33 bin drwxr-xr-x 4 root wheel 136 Feb 24 20:10 etc drwxr-xr-x 271 root wheel 9214 May 22 20:18 include drwxr-xr-x 387 root wheel 13158 May 22 20:20 lib drwxr-xr-x 106 root wheel 3604 May 22 20:20 libexec drwxrwxr-x 7 root admin 238 Jan 20 00:45 llvm-gcc-4.2 drwxr-xr-x 9 root wheel 306 May 8 16:19 local drwxr-xr-x 236 root wheel 8024 May 22 20:20 sbin drwxr-xr-x 74 root wheel 2516 May 22 20:20 share drwxr-xr-x 4 root wheel 136 May 8 14:23 standalone

Since I cannot find where Bundle::CPAN is located I cannot send you file permissions for it.

Thanks for your time. I really appreciate it.


Comment on Re^2: /usr/bin/instmodsh: Permission denied.
Select or Download Code
Re^3: /usr/bin/instmodsh: Permission denied.
by Anonymous Monk on May 23, 2010 at 15:38 UTC
    What are the permissions on the files instmodsh and perldoc?

    Have you tried $ perl -S instmodsh or $ perl -S perldoc?

    When you get perldoc working try

    $ perldoc -l strict C:\perl\5.10.1\lib\strict.pm $ perldoc -l HTML::Template C:\perl\site\5.10.1\lib\HTML\Template.pm $ perldoc -l Bundle::CPAN No documentation found for "Bundle::CPAN". $ which instmodsh C:/perl/5.10.1/bin/instmodsh $ perldoc -l instmodsh C:\perl\5.10.1\bin\instmodsh
    Alternatively
    $ perl -Mstrict -le " print for values %INC" C:/perl/5.10.1/lib/strict.pm

      Thank you everyone. Someone from apple.com>Unix forum solved my problem. I needed to change the file permissions as below.

      old file permissions: -rw-rw-rw- 34 root wheel 807 Jun 24 2009 instmodsh -rw-rw-rw- 34 root wheel 807 Jun 24 2009 perldoc

      I set the execute bit using:

      sudo chmod +x /usr/bin/instmodsh /usr/bin/perldoc
      new file permissions: -rwxrwxrwx 34 root wheel 807 Jun 24 2009 perldoc -rwxrwxrwx 34 root wheel 807 Jun 24 2009 instmodsh

      Now, it works!

        Lol, always check the obvious first. But there is no way Bundle::CPAN changed the permissions on instmodsh/perldoc... thats unpossable

        I would recommend auditing your system. The permissions on these files are not sane, and I would not trust that these are the only ones.

        Both the old and the new file permissions are insanely insecure. Whatever set the initial permissions should be sought out summarily executed.

        Unix permissions are grouped into a type indicator, and three groups of three permission "bits".

        • Char 1: type indicator. '-' is a "regular" file, 'd' is a directory, 'l' is a symlink, 'c' is a character special file, 'b' is a block special file, and so on.
        • Char 2-4: Owner ("root" in this case) permissions. Read, Write, Execute.
        • Char 5-7: Group ("wheel" in this case) permissions. Read, Write, Execute.
        • Char 8-10: Other permissions. Read, Write, Execute.

        What do you think happens when Read, Write, and Execute are enabled for other (hint: "other" is able to change the file)? Does a privileged user ever execute that file (hint: if "yes", "other" now has control over what privileged user is executing)?

        The solution given by the mac forum is accurate (that command adds the execute bit to owner, group, and other), but is incomplete. You also need to remove the write permissions from those files. As mentioned above, I would not trust that these are the only files with insecure permissions.

        Update: Removed assumptions about Unix knowledge (added 'hints').

        --MidLifeXis

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://841258]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-12-28 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls