#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    54
    Rep Power
    9

    Exclamation ROOT ?! Or Not ROOT ?!!




    Hello every one

    I have a strange behavior here on my OpenBSD 4.7 box..
    I am logging in root (Don't kill me !! just for this exemple), and when I try to run:
    $ /etc/netstart
    Then I get a " Permission denied " error ?!!
    Did it happened to some of you and do someone know why it hapened?

    Thanxx to all of you for any help ..

    Cheers,
    Shpiz
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1100
    What do the permissions look like when you:
    Code:
    ls -l /etc | grep netstart
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    54
    Rep Power
    9
    Yep I do not have the X attribute ... Why it has changed? I didn't touched anything....
    and before I was just doing
    # /etc/netstart
    under root user
    ???
  6. #4
  7. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1100
    Why it has changed?
    That I can't answer.
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  8. #5
  9. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2005
    Location
    trolls only :)
    Posts
    172
    Rep Power
    0
    You've done something wrong ... don't use root unless necessary. As you can see here /etc/netstart is used with other parameters. What are you ultimately trying to do?
  10. #6
  11. Trapped on the forums...help
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2003
    Location
    /Users/edman007
    Posts
    4,617
    Rep Power
    906
    if the file is in /etc then i assume its some type of config file (that's what goes in /etc along with some start up scripts), by specifying just the path at the command prompt you are telling the system that you would like to to execute it, and executable files need to have the execute permission set, config files on the other hand should never be executed (it just ends in errors) so they normally will not have it set hence the permission denied

    if you are sure that this file should be executable then "chmod a+x /etc/netstat" will allow it
  12. #7
  13. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2005
    Location
    trolls only :)
    Posts
    172
    Rep Power
    0
    If you bothered to check the link i had posted, you will see its a standard BSD script. See the FAQ entry in the link provided.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    54
    Rep Power
    9
    Hi and thank you all for your help, It is really helping.
    Effectivelly as Adman007 says the line "chmod a+x /etc/netstat" allowed it to work..

    Now I am trying to understand why that happened and what could I have done wrong ..
    Actually I am loging in as a normal user then use the SU command to get root access when needed for exemple when I want to vi pf.conf or run a pfctl , restart the network service (/etc/netstart), tcpdump ..
    All those commad are not allowed under the normal user.. it sayes that the user is in the Wheel group and not allowed to it.
    Tell me if you think I should change something on the way I am working ..
    BTW No users other than I do login to this box.

    Cheers everyone and thank you again for your help ..

IMN logo majestic logo threadwatch logo seochat tools logo