0

I have a PHP file on AWS linux server. The address is /var/app/***/a.php. When I try to edit the file using WinSCP, I get the permission denied error.

I tried to access the rights to edit using this command: chown -R root:root /var/app with and without sudo, but it didn't work. What should I do?

1
  • Try to edit file with sudo, e.g. sudo vim /var/app/***/a.php.
    – kenorb
    Jan 15, 2019 at 12:15

1 Answer 1

0

The chown command you are using is setting the permissions to root:root so if you're following good practices and connecting via WinSCP with a non-root user (such as ubuntu), you should actually be using something like chown -R ubuntu /var/app which will change the ownership to that of you're day-to-day user.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .