LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   chown? (https://www.linuxquestions.org/questions/linux-newbie-8/chown-17846/)

joetec 04-05-2002 10:45 PM

chown?
 
I am very new to linux so i am going to look very stupid.

I just bought a dedicated server with redhat linux on it and I have no idea what i am doing.
I was talking to my host and they said I need to chown a directory. How do I do that?

any help is helpful to me :P

X11 04-05-2002 11:43 PM

Chown = Change ownership

This is used to change the group or user ownership of a file or directory.

chown <username> <filename or directory name>

eg.

chown user1 XXX.jpg ;)

X11 04-05-2002 11:47 PM

By the Way
 
You can type man (with a space between them) in front of the command and press enter and that will bring up a manual of the command does and how-to use it.

taz.devil 04-05-2002 11:48 PM

Chown may work better if you use it such as for the /home/user directory like this:

chown username.users directory

That way you, the user and the group users can use that folder depending on what permissions you set using chmod. Use chown -R (recursive) if you want to chown the directory and everything in it. I can't think of any folder at the moment that only has or can have only one owner.??.

joetec 04-06-2002 01:09 AM

ok im in with telnet and type:
chown admin /var/www/html

and it tells me this:
Operation not permitted


what am i doing wrong?

lnxconvrt 04-06-2002 04:57 AM

possible causes
 
1. Were you doing this as root? You usually have to be root to chown.
2. Is admin a valid user? I don't think a group can be the owner, I believe that it must be a user.

Mara 04-07-2002 04:46 AM


 
Try to use
su
before you try chown. Su will ask you for root password. Then you may use whoami and see you're root. Now use chmod.


All times are GMT -5. The time now is 12:00 PM.