Solved

Ubuntu / Linux Permissions Question

Posted on 2011-02-25
6
491 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 500 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

691 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