• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved SFTP Connection Issue

UHF

New Pleskian
Server operating system version
Ubuntu 22.04.2 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.53 Update #2
Hello,

I am trying to SFTP in my Website.
  1. I am using VPS. And I am the admin of the VPS.
  2. I have disable root account via SSH terminal.
  3. And I have created a secondary sudo user account with SSH Keys.
  4. I am able to SSH into my Server via terminal without any issue.
I am using Nova as my text editor and connection manager.
  1. In Plesk, there is a FTP account associated with with my website.
  2. I have enable access sever over SSH with chrooted. I am not sure if this should be selected?
  3. But obviously the FTP Username is different from the secondary sudo user account name of the server.
  4. I am aware that the website are located in /var/www/vhosts/ <domain_name>
I SFTP-ed into my server using my secondary sudo account without any problem.

But when I try to expand the folder of my website, example.com, I get an error in Nova.

I get this error from Nova - "Could not retrieve file listing for "/var/www/vhosts/example.com". Make sure you have permission to modify this file."

How can I fix and solve this? What do I need to do in order to expand the folder of my website with out any permission issue?

Thank you.
 

Attachments

  • SSH1.png
    SSH1.png
    26.9 KB · Views: 4
  • SSH2.png
    SSH2.png
    250.3 KB · Views: 4
I am not sure whether there is an easy solution. The reason is that the path is owned by the subscription user and the group is either psaserv or psacln. An additional SFTP user cannot access these files, because it is not in these groups, neither is it the owner.
 
I am not sure whether there is an easy solution. The reason is that the path is owned by the subscription user and the group is either psaserv or psacln. An additional SFTP user cannot access these files, because it is not in these groups, neither is it the owner.

Hello,

Thanks for the reply. And your reply kept me thinking.

I believe I have solved it. Here is what I did.
  1. In terminal, I ssh in to my server using my secondary sudo user account.
  2. I typed sudo nano /etc/ssh/sshd_config
  3. I went to the line AllowUsers and added the username of my FTP account associated with my website in Plesk
  4. I have save the sshd_config file.
  5. I typed sudo systemctl restart sshd
Now back in my Nova App, instead of using my secondary sudo server account, I used the FTP account associated with my website in Plesk. For the remote path, I simply typed it as /httpdocs/.

I was able to SFTP into my without any issue. I was able to access the files in the path.

@Peter Debik I am not sure if this is the correct approach?

I hope anyone would find my reply useful if they encounter a similar issue.

Thank you.
 

Attachments

  • Path.png
    Path.png
    12.5 KB · Views: 1
Back
Top