Mobile app version of vmapp.org
Login or Join
Heady270

: CPanel - How to change FTP home directory in Centos 6 I have created one Linux centOS 6 instance in Amazon EC2 and installed cPanel on it and started running my websites there. The issue

@Heady270

Posted in: #AmazonEc2 #Cpanel #Ftp

I have created one Linux centOS 6 instance in Amazon EC2 and installed cPanel on it and started running my websites there. The issue I face is when I try to FTP to the instance with following config


IP : Instance IP
Username : centos
Password : Blank
Mode : SFTP
SFTP Key : Private KEY (PEM) Provided by Amazon EC2 dashboard


I got to view only the /home/centos directory. But I want to view the main directory which is back to the /home directory. When I tried to click .. in FileZilla it says:


Permission Denied


So, i tried the following

vipw /etc/passwd


and changed

centos:x:1000:1000:Cloud User:/home/centos:/bin/bash


to

centos:x:1000:1000:Cloud User:/ :/bin/bash


and even to

centos:x:1000:1000:Cloud User: :/bin/bash


However, after this change FTP stopped logging in.

So I reverted back to:

centos:x:1000:1000:Cloud User:/home/centos:/bin/bash


Kindly guide me to achieve this.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

cPanel tends to mess around a lot with the default centos folder structure and permissions etc.
It looks like you are connecting with SFTP "Mode : SFTP".

If you are looking to connect over FTP as your question suggests you could create a new FTP account via cPanel, setting its root folder to the location of the site you are creating it for, say .../htdocs/public_html/mysite/"

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme