I run the command chown -R root:1003 . in SSH and now when I try to connect to FTP it says Access Denied, what should I do to fix this problem ? The 1003 it's the group code for my httpacces folder. The httpacces is the location where I installed my Magento2 and I tried to make user root the owner of all folders and sub folders, the problem is that I can't access FTP even with root.

1 Answer 1


What's your web user? The files should be owned by this user.

e.g. if web user is www-data, you'd type this within the Magento root directory.

sudo chown -R www-data:www-data .

N.B, you shouldn't be using the root user for FTP (or ssh), create a sudo account and create your web apps via that.

  • How i check my web user? Jun 1, 2018 at 9:31
  • Apache or nginx? if apache try ps aux | egrep '(apache|httpd)' Jun 1, 2018 at 9:32
  • When i use the command given Putty shows this: imgur.com/YqL5xQR ---> What to do now? Jun 1, 2018 at 9:34
  • that shows your web user is apache. So try chown -R apache:apache . Jun 1, 2018 at 9:41
  • Ok so i used "cd /var/www/vhosts/ecustock.ro/httpdocs" (httpdocs it's the directory where i installed Magento2, and then used "chown -R apache:apache ." but the problem persists, when I try to connect to FTP i get this error: imgur.com/a/I30kCMz Jun 1, 2018 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.