?
Solved

Ubuntu / Linux Permissions Question

Posted on 2011-02-25
6
Medium Priority
?
492 Views
Last Modified: 2012-05-11
I'm using Ubuntu 10. I'm using WinSCP to copy files from my Windows computer to the Ubuntu box. When I copy files over I get the attached error. I can copy to my home directory fine but when I try to copy to the /var/www directory I get the error. I am logged in with the user account I set up when I installed Ubuntu yesterday. I'm new to this so I'm hoping this is an easy fix. Thanks
ubtun.JPG
0
Comment
Question by:wantabe2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Expert Comment

by:matstherkelsen
ID: 34979097
Your user has no access in the /var/www folder. The following command should fix it:

sudo -R chmod 777 /var/www

0
 
LVL 12

Accepted Solution

by:
upanwar earned 2000 total points
ID: 34979101
You dont have the permission to write in /var/www, Because you are logged in by normal user not by root so first copy that file in your home directory and then copy that file from your home directory to /var/www by executing the below given command.

sudo cp /home/<your user name>/<file name> /var/www/.
0
 
LVL 35

Expert Comment

by:torimar
ID: 34979105
This is the permission's issue that always makes me wonder why people even bother to use Ubuntu as a server OS. Simply use Debian (the mother of Ubuntu) and everything will work fine.

In detail:
Ubuntu has practically abolished the root user which is required for practically every movement you do in server administration. It is still there, but you cannot use it to login.
All files outside of your user's home dir belong to this unobtainable root account.

On an Ubuntu desktop, this is easily dealt with by using the "sudo" command in front of all administrative commands. When conneting to your server via SSH, you can open a root terminal via the command "sudo -i".

But here, in WinSCP, the full drawback of the Ubuntu server becomes obvious.
You need to elevate your privileges to root, but how? Unfortunately, that is a question I cannot answer because I use Debian, never Ubuntu when it comes to servers. There may be a workaround, and somebody here may know it.
Otherwise, simply consider switching to Debian.
0
DFW AZURE MEETUP TONIGHT FRI 6PM

We will be discussing what Azure Stack is, how does it fit into the suit of offerings that Azure has currently, and where can it fit into your organizations technology stack. We will also be discussing limitations of the platform while covering various applicable scenarios.

 
LVL 16

Expert Comment

by:santoshmotwani
ID: 34979109
log onto ubuntu
go to terminal
type su
enter root password

chmod 0777 /var/www/



This will do the  job.
0
 
LVL 16

Expert Comment

by:santoshmotwani
ID: 34979113
chomod -R 0777 /var/www
0
 
LVL 35

Expert Comment

by:torimar
ID: 34979121
ps:

I wouldn't suggest you use another server OS if you didn't say yourself that you only installed Ubuntu yesterday.
0

Featured Post

Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question