Solved

Ubuntu / Linux Permissions Question

Posted on 2011-02-25
6
490 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
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error log using ftp 7 81
What is the best way to transfer files from and to Linux VNC window? 9 73
Centos 7 DNS server not replying to clients 3 57
IMAP copying tool 14 47
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

749 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