Search code examples
amazon-web-servicesubuntupleskuser-permissions

Vhosts domain 503 unavailable after changing user permisson on Ubuntu (AWS Lightsail)


At the recent time, I was trying to setup an SFTP on my AWS lightsail - Ubuntu Plesk instance. Once I noticed my current user doesn't have access to vhosts/example.com/httpdocs folder, I tried to give the current user access rights with giving this command on ssh :
- sudo chown -R (my-username)

after that I sucessfully got the access to desired folder on my sftp client. But unfortunately, there was something wrong on its domain when I accessed in browser with 503 Error. And also the file manager in Plesk returned an Error 13.

after recover the the user permission with this command :
- /usr/local/psa/bin/repair --restore-vhosts-permissions

the file manager was back to normal, but not the website domain : which still has 503 error.

any idea what's wrong with that? I believe this has to be user permission problem, but couldn't find anywhere else to fix it. not to mention, I am newbie on Ubuntu server.
hope to find some decent answer here :) Thanks and have a good day!


Solution

  • So, After few months of deploying VPS in AWS Lightsail with Plesk, There are few things that could lead this problem happen. 1. Permission is not enough for the directory, make sure you have at least 755 for the root or desired directory you want to access. 2. The PHP version and Nginx/Apache Configuration can also be the issue. In some cases, The current Plesk Onyx delivered along with Nginx and Apache, I always choose "FastCGI application served by Apache" and it is often solve the problem. This setting can be found "websites & Domains > PHP Settings" 3. Missing Index.php or Index.html or reference file for indexing. So the server is confused to interpret which file should be access first.

    I hope this solve someone else problem. Discussion can be continued on the comment. :) Have a good day!