4

I created a website under /var/www/html/ all under root, all images, files, .htacess, directories, etc... I uploaded and configured everything as root.

I want to make it it's own username/password so it's not owned by root. I currently do not have the user account made either, I want to also setup FTP for the user account.

There is also about 30GB of images in the folder as well.

How can I go about changing all of this?

I am running CentOS 5.5 64 bit.

Thank you!

Andrew Fashion
  • 1,655
  • 7
  • 22
  • 26

2 Answers2

11

adduser ftpuser

passwd ftpuser # set the password

chown -R ftpuser /var/www/html/

James L
  • 6,025
  • 1
  • 22
  • 26
becomingwisest
  • 3,328
  • 20
  • 18
2

I think the answer from packs is generally correct, but you should be careful about changing ownership of too mrny files and directories unexpectedly. It's a good idea to run something like

find /var/www/html -print | less

and verify it matches the set of files and directories you expect to change.

Phil Hollenback
  • 14,947
  • 4
  • 35
  • 52