Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to add online store configuration files in file system var/www. but I can't access the file system, because it says that only owner can access it, the owner is root.

So, how can I access those files? Or is it possible for me to use my file system as a owner?

I need to create a directory named ubuntu in var/www and store my online store configuration files.

share|improve this question

3 Answers 3

By default /var/www is owned by root:root and no one but the admin can add or change files there. You need to set contents of /var/www/ to the correct permissions. There are several methods but the one I use: set the group to www-data and add your user to that group.

Setting group www-data:

sudo chgrp -R www-data /var/www/ubuntu

Add your user to www-data:

sudo usermod -a -G www-data $USER

That way you are part of the group that can write inside /var/www/.

But I would start by reading the documentation that you got with the webserver since this is just a small part in setting the correct and secure permissions. Directories tend to have permissions set to 755 or 775 and files to 644 or 664 depending on who you want to be able to do things.

share|improve this answer

Try sudo -s command in terminal. But make sure you know what you’re doing.

Also, if you don’t want to mess with terminal, you can press ALT+F2 and enter gksu nautilus. This will open a file manager window from root user.

share|improve this answer
    
Also, if you don’t want to mess with terminal, you can press ALT+F2 and enter gksu nautilus. This will open a file manager window from root user. –  Aleksandr Chepurnoy Feb 12 '13 at 11:35
    
and may I know what should I do next?? as I am new to ubuntu it would be grt if you explain me in detail!! –  Shry Vishnu Murugesan Feb 12 '13 at 11:43
    
thank you for your help :) –  Shry Vishnu Murugesan Feb 12 '13 at 11:52
    
@AleksandrChepurnoy please put that part from your comment into your answer. –  guntbert Feb 12 '13 at 17:10

A more GUI friendly way is using the gksu command in terminal it gives you a little pop up box and type in Nautilus to open it as root

share|improve this answer
    
I would not assume that he has a desktop ;) This sounds more like a (hosted) server. –  Rinzwind Feb 15 '13 at 10:54

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.