Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi I've just set up a new EC2 ubuntu server at AWS yay.

Im logged in as ubuntu@mydomain.com

first I installed mysql, php5 and apache2, no problem.

now I want to edit my /etc/apache2/sites-available/default file to setup where my domains should point to....

but It seems I dont have permissions to write to the file.. and I dont have permissions to change the file permissions either.

then I tried editing the default index.html file in /var/www/index.html... but I got the same error/problem

any ideas?

share|improve this question
1  
Please don't take this the wrong way, but you seem to be in need of a basic Unix tutorial. You don't seem to quite grasp two core concepts of Unix (a multi-user system, and file ownership/permissions). Bringing you up to speed on this is well beyond the scope of what can be done on a Q&A site like Server Fault. Google can hook you up with some tutorials. There's also a YouTube video about file permissions and ownership that might be useful. –  voretaq7 Jan 24 '13 at 16:38
    
you are quite right.. I am new to linux and using the CLI but im kind of learning by doing, or learning by messing up. –  Oldenborg Jan 24 '13 at 23:34
    
That's the best way to learn - but spending an hour or so with a basic tutorial (or even Linux for Dummies) will save you a man-month of messing up and make it a way more pleasant experience. (Or find a local Unix admin to mentor you - that's way better than books.) –  voretaq7 Jan 24 '13 at 23:39

1 Answer 1

up vote 4 down vote accepted

You have to become root.. So you can turn into root via

sudo su -

Or just run as root everytime you need permissions

sudo vi  /etc/apache2/sites-available/default
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.