0
votes

I am new to Linux and Apache and have beginners permissions issues ...

I installed Ubuntu and has installed and configured apache and PHP via SSH (putty) from my windows box. apt-get

I have installed WinSCP and has used that for file transfers from Windows to Ubuntu. That is working fine after i figured out how to the permissions on the website directory.

Now I have new permission problems when I try to edit /etc/apache2/apache2.conf

No matter what i try i get a permission denied.

I am trying to download the file using WinSCP, edit it windows and then upload the file again. This results in a

Permission denied. Error code: 3 Error message from server: Permission denied

This is my current permissions:

drwxrwxr-x 8 root root 4096 Nov 16 16:24 apache2 -rwxrwxr-x 1 root root 7115 Jul 21 19:56 apache2.conf

Can anyone point me in to direction?

1

1 Answers

0
votes

1) try to SCP as root user 2) try to login as root with SSH and use mcedit to edit the file please note: in some systems, ssh to root user is prohibited by default, so you have to ssh to your user, and give the command: su (and enter the password) or sudo su if you have sudo rights. to access via ssh, use PUTTY. once you're in, install mc: apt-get install mc after this, you can use mcedit: mcedit /etc/apache2/apache2.conf

mcedit is a really well designed editor, it's quite easy to use.