Ps(1) Restricting Command Lines

From: Dave Tweten (tweten_at_nas.nasa.gov)
Date: 03/29/04

  • Next message: Garance A Drosihn: "Re: Ps(1) Restricting Command Lines"
    To: stable@freebsd.org
    Date: Mon, 29 Mar 2004 13:20:12 -0800
    
    

    As of my STABLE upgrade to the 8:00 GMT Saturday version, I have noticed
    that ps(1) is behaving differently. Unless run by root, "ps -ax" refuses
    to print the command line associated with each process. I've checked a
    couple things:

    1. /bin/ps is not SGID kmem and /dev/kmem permission is set to 0640,
       but that isn't the cause of this problem (though it may cause
       others, since the ps(1) man page says it needs to read /dev/kmem).

    2. /proc/*/cmdline is owned by root:wheel and has 0444 permissions.
       It should therefore be usable by ps(1) regardless of who runs it.

    So it looks like command lines should print, but they don't. Does anybody
    know what's happening here?

    -- 
    M/S 258-5                    |1024-bit PGP fingerprint:|tweten@nas.nasa.gov
    NASA Ames Research Center    | 41 B0 89 0A  8F 94 6C 59|     (650) 604-4416
    Moffett Field, CA  94035-1000| 7C 80 10 20  25 C7 2F E6|FAX: (650) 604-4377
    Not an official NASA position.  You can't even be certain who sent this!
    _______________________________________________
    freebsd-stable@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-stable
    To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
    

  • Next message: Garance A Drosihn: "Re: Ps(1) Restricting Command Lines"

    Relevant Pages

    • Re: System-users and-groups?
      ... bin shouldn't do so much. ... was root and bin... ... Although the daemon user/group are ... as that user runs that command. ...
      (alt.linux)
    • RE: remote ssh for root
      ... forced-commands-only option set, you have to have the command option set. ... execution as root. ... > This message contains confidential information and is ...
      (SSH)
    • Re: grub menu oddity
      ... >>> command (until the manual root command was executed). ... >>> When I first encountered this behavior, it took several reboots for me to ... FWIW - a new CMOS battery is only $3-5 at your local Shaque du Radio ...
      (comp.os.linux.setup)
    • Re: [PHP] strange errors from command line vs. web
      ... standard php. ... > can't run the script from the command line even when I su to root. ... >>> I have some code that makes a connection to the db. ...
      (php.general)
    • Re: SU privileges
      ... If you know a userid you want to limit the ability to su too (like root), ... Another way would be to set an ACL on the su command. ... If you have received this electronic transmission in error, please notify the sender immediately by a "reply to sender only" message and destroy all electronic and hard copies of the communication, including attachments. ...
      (AIX-L)