LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-12-2003, 12:01 AM   #1
Panopticon
LQ Newbie
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28

Rep: Reputation: 15
Can't save files to /var/www/html/


Hey guys, big newbie here in need of some quick help

I'm trying to save an html file to /var/www/html/ folder so i can view it from the localhost.

But everytime i try and put a file there it says access denied. is there anyway to enter SU through the GUI? I've tryed opening bash, entering super user and then trying to drag 'n drop. I think im just too much of a noob for my own good

can anyone help?


p.s. using mandrake 9.1 w/kde
 
Old 09-12-2003, 12:20 AM   #2
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Re: Can't save files to /var/www/html/

Quote:
Originally posted by Panopticon
Hey guys, big newbie here in need of some quick help

I'm trying to save an html file to /var/www/html/ folder so i can view it from the localhost.

But everytime i try and put a file there it says access denied. is there anyway to enter SU through the GUI? I've tryed opening bash, entering super user and then trying to drag 'n drop. I think im just too much of a noob for my own good
p.s. using mandrake 9.1 w/kde
I assume that you're running a WIndow manager, running something like a explorer (I'm not familiair with kde) and try to move a file to a place which is not allowed due permission restrictions ...

Open a terminal, and type the following:

su -
then type the root passwd when asked.
cd /to/path/where/your/file/is.txt
cp filename.txt /var/www/html/

cd /var/www/
ls -al html and print the output here ...
 
Old 09-12-2003, 12:27 AM   #3
Panopticon
LQ Newbie
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28

Original Poster
Rep: Reputation: 15
yah i was using a window explorer type deal.

The shell command worked like a champ

THANKS!
 
Old 09-12-2003, 01:03 AM   #4
Panopticon
LQ Newbie
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28

Original Poster
Rep: Reputation: 15
hmm

also, I've been reading and reading, but cant find what im looking for.

I'm trying to refer apache to a different default directory. (ie /home/'user'/documents)

I've been reading and reading and from what i understand i must edit a config somewere....can anyone point me in the right direction for this?

-Paul
 
Old 09-12-2003, 01:07 AM   #5
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Panopticon
hmm

also, I've been reading and reading, but cant find what im looking for.

I'm trying to refer apache to a different default directory. (ie /home/'user'/documents)

I've been reading and reading and from what i understand i must edit a config somewere....can anyone point me in the right direction for this?

-Paul
Yah sure, if you use apache1-3 find the file httpd.conf by typing: locate httpd.conf

If you use apache2 find the file: apache2.conf by typing locate apache2.conf. Then search for the "documents root" or something ...
 
Old 09-12-2003, 01:19 AM   #6
Panopticon
LQ Newbie
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
Yah sure, if you use apache1-3 find the file httpd.conf by typing: locate httpd.conf

If you use apache2 find the file: apache2.conf by typing locate apache2.conf. Then search for the "documents root" or something ...
how do i edit this file?
 
Old 09-12-2003, 01:25 AM   #7
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Panopticon
how do i edit this file?
Heh try something like "vi" or "vim" or "emacs" if they are installed. Just give it a try

Hope this helps
 
Old 09-12-2003, 01:37 AM   #8
Panopticon
LQ Newbie
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
Heh try something like "vi" or "vim" or "emacs" if they are installed. Just give it a try

Hope this helps
well..i changed the Default Root to /home/paul/www/ f

and now when i go http://localhost/ i get a forbidden error.


....damn 2:37am..makes it hard to think straight.
 
Old 09-12-2003, 01:47 AM   #9
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Panopticon
well..i changed the Default Root to /home/paul/www/ f

and now when i go http://localhost/ i get a forbidden error.


....damn 2:37am..makes it hard to think straight.
That's correct, make sure that the file rights are ok. make it a chmod 755 -R for the map /home/paul/www -R

Hope this helps
 
Old 09-12-2003, 01:48 AM   #10
Panopticon
LQ Newbie
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
That's correct, make sure that the file rights are ok. make it a chmod 755 -R for the map /home/paul/www -R

Hope this helps

AHH i know chmod changes file rights

so at the console i type:

chmod 755 -R /home/paul/www -R

like that?
 
Old 09-12-2003, 01:50 AM   #11
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Panopticon
AHH i know chmod changes file rights

so at the console i type:

chmod 755 -R /home/paul/www -R

like that?
Yep :-)
 
Old 09-12-2003, 01:52 AM   #12
Panopticon
LQ Newbie
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28

Original Poster
Rep: Reputation: 15
no luck :-( mabe i edited the httpd2.conf incorrectly

-Paul
 
Old 09-12-2003, 01:56 AM   #13
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Panopticon
no luck :-( mabe i edited the httpd2.conf incorrectly

-Paul
In your previous post you say:
well..i changed the Default Root to /home/paul/www/f

Do you mean that the files are in: /home/paul/www/f
or:
/home/paul/www/

httpd2.conf or httpd.conf ?
if httpd2.conf then do a cp httpd2.conf httpd.conf. Start and stop apache and try again

Last edited by daveo; 09-12-2003 at 01:58 AM.
 
Old 09-12-2003, 02:01 AM   #14
Panopticon
LQ Newbie
 
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
In your previous post you say:
well..i changed the Default Root to /home/paul/www/f

Do you mean that the files are in: /home/paul/www/f
or:
/home/paul/www/

httpd2.conf or httpd.conf ?
if httpd2.conf then do a cp httpd2.conf httpd.conf. Start and stop apache and try again
oops the F is a typo in the post it was /home/paul/www/

it was httpd2.conf

how do i start and stop apache?

(heh heh sorry bout all the newb questions..gotta learn somehow right?)
 
Old 09-12-2003, 02:03 AM   #15
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by Panopticon
oops the F is a typo in the post it was /home/paul/www/

it was httpd2.conf

how do i start and stop apache?

(heh heh sorry bout all the newb questions..gotta learn somehow right?)
/etc/init.d/apachectl stop
/etc/init.d/apachectl start

otherwise:

/etc/init.d/apache stop
/etc/init.d/apache start
 
  


Reply



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
How do I give a user permission to save files to /var/www/html? rotnay6000 Linux - Newbie 10 07-14-2009 08:45 PM
help in /var/www/html/!! chidomen Linux - Newbie 4 01-13-2005 11:02 AM
apache server setup and how to place files in the var/www/html directory dramous Linux - Newbie 7 09-28-2004 04:18 AM
apache server setup and how to place files in the var/www/html directory dramous Linux - Software 3 09-25-2004 02:38 AM
apache server setup and how to place files in the var/www/html directory dramous Linux - General 2 09-25-2004 01:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:00 PM.

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
Open Source Consulting | Domain Registration