The cd command is a built-in command of the shell -- there is no cd command in,
say, /bin.
Even if there were, sudo cd /some/where would not make sense: sudo runs the
command in a new shell with the enhanced permissions, and when that shell ends,
you are returned right back to where you were before.
So, either ask for a root shell:
sudo -s
or run a single command with sudo, and let your current directory be what it is
now:
sudo /var/ossec/bin/ossec-control restart
Hope this helps
--
Scott
On Dec 22, 2012, at 6:47 AM, "dan (ddp)" <[email protected]> wrote:
> On Dec 22, 2012 7:43 AM, "finid" <[email protected]> wrote:
> >
> >
> > Attempting to run cd /var/ossec after installing it on Linux Mint returns
> > the following:
> >
> > bash: cd: /var/ossec: Permission denied.
> >
> > But sudo cd /var/ossec returns
> >
> > sudo: cd: Command not found
> >
> > Any clues?
>
> Try it as root, or add your user to the ossec group. Sounds like something on
> your system is hosed (no PATH with sudo?).
>