What is the bash version of Chown?

What is the bash version of Chown?

I just get this when I try to use it:

-bash: chown: command not found

Ta x
Daizzy-MaeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jghelfman40Commented:
make sure you are using full paths to your binaries


/bin/chown
/usr/local/bin/bash or /bin/bash

type:

which chown
which bash

these will determine where these programs are.
0
Daizzy-MaeAuthor Commented:
Thank you, just to clarify:

This is what I was needing to type into PuTTY:
chown -R apache ./gnupg-files/.gnupg

which chown gives nothing
which bash gives:
//bin/bash


What should I type in to the command line instead of "chown -R apache ./gnupg-files/.gnupg"?
0
SuperdaveCommented:
Try /usr/bin/chown, /usr/local/bin/chown, or /sbin/chown.  If those don't work you could try to find it with:
locate chown
or:
slocate chown

If those don't work, they probably set it up so you can't access it.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Joseph GanSystem AdminCommented:
You need to set PATH, what is output of
# echo $PATH
0
TintinCommented:
chown isn't a shell command, it's a system binary, therefore it doesn't matter what shell you are using.

The issue is that you don't have /bin in your PATH environment variable.

Type in

echo $PATH

and you'll almost certainly not see /bin

To add on the fly, do

export PATH=$PATH:/bin

and to make it permanent, add that line to ~/.bash_profile
0
SuperdaveCommented:
She has bin in her path or it wouldn't have found bash there, so I think it's more likely she's accessing a restricted environment where they don't want you to be able mess with file ownership.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TintinCommented:
Ah, just re-read the whole thread.

My guess is this is on a VPS where there are restrictions to certain commands like chown.
0
hemmiCommented:
What system are you on?
What is the result of

which busybox

?
0
Daizzy-MaeAuthor Commented:
Thank you for all of your help:

SuperDave:
It seems I am not set up to use chown (I am on shared hosting with a big comapny so I guess they don't want people medling).
[timetogoveggie.com@shell1c40 /]$ locate chown
locate: /var/lib/locatedb: No such file or directory

Tintin:
[timetogoveggie.com@shell1c40 /]$ echo $PATH
//bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin

hemmi:
which busybox gives nothing I'm afraid.

Thank you all for your help, I think probably SuperDave is correct that my user is not alowed to use chown as I am on shared hosting.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.