Page 1 of 1

Command for file owner change

Posted: Wed 8. Jul 2020, 14:01
by frajer
Hey!

Does exist any command, for changing an file owner and group?

Some stuff on my website is running as a root, and i am just finding some way, how to change it to user account, without any file lose.
That stuff has more than 1 GB, so unfortunaly i cant download it and put it to File manager in my ACP.

Also if it doesnt exist, is there a way, how to connect via user through FTP? I mean if i will paste there something, it will be under user not a root.

Re: Command for file owner change

Posted: Wed 8. Jul 2020, 14:14
by Tobi

Re: Command for file owner change

Posted: Wed 8. Jul 2020, 14:17
by Florian
Hello,

the command is called chown

e.g.

Code: Select all

chown -R user:group *
That will change all files and subdirectories of the folder you changed to. !!!! So please take care that you run this command in the correct folder!!!!