We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
WordPress FTP issue - chown user:root?
WordPress FTP issue - chown user:root?
I'm a first time user of VestaCP. I successfully installed VestaCP on my VPS last ight. Everything went well except for an FTP issue with my WordPress installation, i.e. when I want to download plugins WordPress wants my FTP details.
When I researched the problem I found the solution below, but don't know who the user of my WordPress installation is. Maybe you could help me figure that out? I uploaded the WordPress installation files to mydomain public_html, through FileZilla with SFTP. Since I used SFTP instead of FTP would the user be root?
Won't it be a security risk to make root the owner of the domain? Maybe I should install an FTP server?
When I researched the problem I found the solution below, but don't know who the user of my WordPress installation is. Maybe you could help me figure that out? I uploaded the WordPress installation files to mydomain public_html, through FileZilla with SFTP. Since I used SFTP instead of FTP would the user be root?
Code: Select all
chown -R user:user /home/user/web/userdomain.com/public_html
Re: WordPress FTP issue - chown user:root?
I think I've found an answer in another thread that I'll try out tonight:
Source: viewtopic.php?p=23724#p23724
If root is the owner, then I have to give admin permission to own the public_html of the domain.
I don't need to install an FTP server.
Code: Select all
cd /home/admin/web/domain.tld/public_html/
chown admin -R *
If root is the owner, then I have to give admin permission to own the public_html of the domain.
I don't need to install an FTP server.
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: WordPress FTP issue - chown user:root?
You can create a new user in the vesta control panel or use the admin user. By default, you can log in with that user to FTP or SFTP, so you don't need to log in as root.
Re: WordPress FTP issue - chown user:root?
Thanks tjebbeke. One doesn't need to create a new user. One only needs to give Admin ownership of public_html. One should do that anyway. I did it last night, and not only did it fix my WordPress issue, but everything else including the Duplicator Plugin worked. The issue has been solved for me thanks.
The issue is more prevalent with VestaPanel users, as in many cases the users have not installed FTP servers and/or are using SFTP to install their WordPress sites. So in effect they are installing WordPress as ROOT. WordPress is looking for ownership by ADMIN so one needs to give ADMIN ownership of public_html.
Alternatively of course one can install an FTP server - I decided not to do so.
This solution definitely works:
The issue is more prevalent with VestaPanel users, as in many cases the users have not installed FTP servers and/or are using SFTP to install their WordPress sites. So in effect they are installing WordPress as ROOT. WordPress is looking for ownership by ADMIN so one needs to give ADMIN ownership of public_html.
Alternatively of course one can install an FTP server - I decided not to do so.
This solution definitely works:
Code: Select all
cd /home/admin/web/domain.tld/public_html/
chown admin -R *
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: WordPress FTP issue - chown user:root?
@deanhills, that is a solution, but maybe it's better to login as the admin user than as root user. You can also use 'su admin'. Then you don't have problems with ownership. It's also more secure to not use the root and admin user and create a new user in the vesta control panel to host your domains.