LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-20-2009, 11:26 PM   #1
murphy-o
LQ Newbie
 
Registered: May 2009
Distribution: Ubuntu Jaunty
Posts: 5

Rep: Reputation: 0
Unable to change/edit html files in new Ubuntu 9.04 / Apache server


I suspect that this has come up numerous times, but I am new to Linux and I am setting up a new in-house server using Ubuntu 9.04 and Apache, etc.
I can see the welcoming "It Works!" message when I log in via Firefox. I can see "index.html" when I FTP the server with the site name and password at /var/www. I can also see the -rw-r-r-- attributes, but I can't edit the HTML file or replace it.
When I try to rename the "index.html" file, I get the following message:

"Request denied.
Verify that the file or folder exists and that you have the necessary permissions on the server to perform the requested operation."

I haven't been able to determine where to enter the password or what changes I need to make to be able to work with the /var/www directory via FTP.
Any help will be appreciated. If this has been dealt with in plain English elsewhere, a link would be helpful.

Thanks, Murphy / Nicola Valley Museum
 
Old 10-21-2009, 12:28 AM   #2
eth1
Member
 
Registered: May 2008
Posts: 97

Rep: Reputation: 20
Most likely, the file ownership and permissions only allow the root user to modify/edit that file.

In order to modify the file you need to login into the server via SSH (if it's at a remote location) or at the terminal and execute the command,

Quote:
sudo vi /var/www/index.html
This will prompt you for your user login password. It should open the file index.html in a text editor vi with read and write access.

You need to check for the commands sudo and editor vi.
 
Old 10-21-2009, 01:16 AM   #3
murphy-o
LQ Newbie
 
Registered: May 2009
Distribution: Ubuntu Jaunty
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks, sudo, vi, etc. works to edit the actual file, but I still don't know how to change permissions so that I can replace or add files in the var/www directory when I log in via FTP. I have been able to do that for years on various hosted websites, but I'm missing some knowledge in setting up my own server so that I can make changes via FTP. Murphy
 
Old 10-21-2009, 01:23 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,628

Rep: Reputation: Disabled
You can use chmod to change the permissions. man chmod to learn the command. To change the ownership of the file, use chown. man chown to lean the command.
 
Old 10-22-2009, 12:18 AM   #5
murphy-o
LQ Newbie
 
Registered: May 2009
Distribution: Ubuntu Jaunty
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks to both of you. The "ownership" turned out to be the problem.
I used "sudo chown -R nicola /var/www" to change the /www directory ownership and now my logon password applies to it and I can transfer files via FTP.

Now I can continue my steep learning curve to set up Digital Collection Builder for our small-town museum.

Thanks again
Murphy
Merritt, BC Canada
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to edit files in folder. dvargas Linux - Newbie 1 05-22-2008 02:57 PM
Apache index.html edit makes no change dwbrown Linux - Software 2 09-29-2004 12:36 PM
apache server setup and how to place files in the var/www/html directory dramous Linux - Newbie 7 09-28-2004 05:18 AM
apache server setup and how to place files in the var/www/html directory dramous Linux - Software 3 09-25-2004 03:38 AM
apache server setup and how to place files in the var/www/html directory dramous Linux - General 2 09-25-2004 02:29 AM


All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration