Find the answer to your Linux question:
Results 1 to 3 of 3
Well I wrote a couple of scripts and I did put them in /usr/sbin I did chmod +x to the scripts and i tested them by going to home and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429

    Cant run +x scripts over SSH?


    Well I wrote a couple of scripts and I did put them in /usr/sbin
    I did chmod +x to the scripts and i tested them by going to home and trying to execute the command. Success!
    Ok, so now I SSH to the Same PC. I am another user (non-root this time)
    I try to execute the command. Failure! Then I try to run it with the full PathName /usr/sbin/command and it runs fine.
    What did I do wrong?

    Did I do something wrong?

    Thanks for all input ^^

    Cheers,
    Robin

    ps. Thanks to Likwid for all the help with the other Topic about nearly the Same.. (But different enough to be a different Topic)
    New Users, please read this..
    Google first, then ask..

  2. #2
    Linux Newbie sdimhoff's Avatar
    Join Date
    Jan 2007
    Posts
    191
    Hi Robin-

    Root will pick out commands from /usr/sbin because:

    This directory contains any non-essential binaries used exclusively by the system administrator. System administration programs that are required for system repair, system recovery, mounting /usr, or other essential functions must be placed in /sbin instead.
    http://www.pathname.com/fhs/pub/fhs-2.3.html

    You will find that if you place the script in the /usr/bin folder then your normal user will be able to use it without the full pathname. If you require it in /usr/sbin then I would suggest using a symlink. Please let me know if this doesn't work for some reason.

  3. #3
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    Ok, thanks I am a moron -.-'
    New Users, please read this..
    Google first, then ask..

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •