Click to See Complete Forum and Search --> : Changing directory ownership


russell
02-22-2001, 06:53 PM
How can I change directory ownership for a certain directory. Here's what I did.

First I ftp'ed in, created a directory under one ftp account for a new website, I made the information match the ftp account as the user and group at the time for that website.

I then went in and had to give it to a new user account, in which I changed the user and group over to the new one to match the ftp account given to them.

But now I have a folder made with one owner, and running under a different owner through the webserver (apache)

How can I change the folder's ownerships from user a to user b. I would appreciate any response asap. :) I have a tight deadline I have to get done. Hope you all have a great day, and this place rocks. :)

Strike
02-22-2001, 07:12 PM
Get into the directory's parent (the directory "above" the one you want to change), and just do a chown username directory-name (where you replace the approriate things with the username you want to own the directory, and the directory name)

teeitup
02-22-2001, 10:40 PM
Read the man page on chown.

If you use the -R switch with command strike gave you, you can change the owner on all files and subdirectories under the main folder you are interested in changing.

JUST BE CAREFULL you know where you are executing the command from.

Good Luck,