How to use chown command in Centos?

Tommyhara

Verified User
Joined
Jul 25, 2014
Messages
185
On my Admin1 account, I added domain with this account, and create FTP account for this domain
But one strange thing is when I edit file with FTP program then it showed error, don't permit me to edit file content

But when I change ownership for html directory
chown -R apache:apache /var/www/html/*

then I can change file content on FTP program

I have a question
this command:
chown -R apache:apache /var/www/html/*
or
chown -R Admin1:Admin1 /var/www/html/*
is exact ?

If possible, give me any examples or details on How to use chown command in Centos?

Thanks in advanced!
 
Hello,

Do you use Directadmin? If not then you'd better ask your question on another forums, as directadmin has it's own organisation of permissions.

Content of web-sites on a Directadmin powered servers is located under /home/<username>/domains/<domain>/public_html

By default a FTP user can modify files in a homedir, except those directories and files that are owned by Apache. To have all the files in public_html and private_html owned by the user we use either PHP-CGI (suPHP, fastcgi, php-fpm) or mod_php+mod_ruid2.

So if you do have a directadmin powered server all what you need is to have php running from name of a regular user (not apache); chown files in public_html and private_html to username:usergroup, and have fun.

In /var/www/html on a directadmin powered server only common php applications are located, and they usually do not require FTP access.
 
Hello,

Do you use Directadmin? If not then you'd better ask your question on another forums, as directadmin has it's own organisation of permissions.

Content of web-sites on a Directadmin powered servers is located under /home/<username>/domains/<domain>/public_html

By default a FTP user can modify files in a homedir, except those directories and files that are owned by Apache. To have all the files in public_html and private_html owned by the user we use either PHP-CGI (suPHP, fastcgi, php-fpm) or mod_php+mod_ruid2.

So if you do have a directadmin powered server all what you need is to have php running from name of a regular user (not apache); chown files in public_html and private_html to username:usergroup, and have fun.

In /var/www/html on a directadmin powered server only common php applications are located, and they usually do not require FTP access.


Hi zEitEr,

I am using directadmin and I found an article How to use Chown command on our forum.

Now I can use it well now.

Btw, Thanks for your info!

Tommy
 
Last edited:
Back
Top