[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1084
  • Last Modified:

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
0
Daizzy-Mae
Asked:
Daizzy-Mae
  • 2
  • 2
  • 2
  • +3
1 Solution
 
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 new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
 
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now