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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-12-2003, 12:01 AM
|
#1
|
LQ Newbie
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28
Rep:
|
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
|
|
|
09-12-2003, 12:20 AM
|
#2
|
Member
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196
Rep:
|
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 ...
|
|
|
09-12-2003, 12:27 AM
|
#3
|
LQ Newbie
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28
Original Poster
Rep:
|
yah i was using a window explorer type deal.
The shell command worked like a champ
THANKS!
|
|
|
09-12-2003, 01:03 AM
|
#4
|
LQ Newbie
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28
Original Poster
Rep:
|
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
|
|
|
09-12-2003, 01:07 AM
|
#5
|
Member
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196
Rep:
|
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 ...
|
|
|
09-12-2003, 01:19 AM
|
#6
|
LQ Newbie
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28
Original Poster
Rep:
|
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?
|
|
|
09-12-2003, 01:25 AM
|
#7
|
Member
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196
Rep:
|
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
|
|
|
09-12-2003, 01:37 AM
|
#8
|
LQ Newbie
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28
Original Poster
Rep:
|
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.
|
|
|
09-12-2003, 01:47 AM
|
#9
|
Member
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196
Rep:
|
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
|
|
|
09-12-2003, 01:48 AM
|
#10
|
LQ Newbie
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28
Original Poster
Rep:
|
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?
|
|
|
09-12-2003, 01:50 AM
|
#11
|
Member
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196
Rep:
|
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 :-)
|
|
|
09-12-2003, 01:52 AM
|
#12
|
LQ Newbie
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28
Original Poster
Rep:
|
no luck :-( mabe i edited the httpd2.conf incorrectly
-Paul
|
|
|
09-12-2003, 01:56 AM
|
#13
|
Member
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196
Rep:
|
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.
|
|
|
09-12-2003, 02:01 AM
|
#14
|
LQ Newbie
Registered: Sep 2003
Location: Ontario, Canada
Distribution: RH8
Posts: 28
Original Poster
Rep:
|
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?)
|
|
|
09-12-2003, 02:03 AM
|
#15
|
Member
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 05:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|