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.
|
 |
04-08-2010, 05:29 PM
|
#1
|
LQ Newbie
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28
Rep:
|
Lack basic understanding of permissions(apache permissions problem)
Hello everyone,
I am very new to linux. The first time i ran a linux machine was one Saturday.
Anyway i am trying to set up an apache web server, all i want to do is play around with html and post it on my unbuntu server so it is available to the internet.
I am also trying to install samba but i am having trouble with that so for now i am using winscp.
Ok, so i made a folder in my home directory for webstuff, and set up apache to look in that folder.
mkdir /home/username/webstuff
I put my index.html file into the /webstuff folder.
But when i go to my website, it says 403 error unable to access "/"
Can anyone help me out? Did i make the folder in the right place?
I do not want people being able to access my / folder so maby i made the web stuff folder in the wrong place?
Also i thought i would just put my inded.html file inside of the default one apache gives you, but when i tryed to transfer index.html it said permission denied.
Anyway any help on how to set up permissions so i can use apache and transfer my html files from my remote desktop to my server would be great!
Thank you!
|
|
|
04-08-2010, 05:55 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
The "normal" way for publishing user-owned files is to stick them
in ~/public_html .... not ~/webstuff
Of course whether or not user directories are enabled depends on
your distro and whether or not you have done anything to apache's
configuration files.
To get more targeted responses I'd recommend that you add your
distro to your profile (or, if you're going to be distro-hopping,
to the post which you are inquiring about certain features in).
Cheers,
Tink
Last edited by Tinkster; 04-08-2010 at 05:56 PM.
|
|
|
04-08-2010, 07:22 PM
|
#3
|
LQ Newbie
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28
Original Poster
Rep:
|
Oh sorry, i am using unbuntu server edition.
Ok so i made a directory in ~$
username@server:~$ mkdir public_html
When i look at the permissions it says
drwxr-xr-x
So the owner has read, write, and execute privilege's the group has read and execute, and the any other user has read and execute privileges?
I am not positive what other user is. Or what exactly that means if anything about internet users connecting to my website.
But i still get the 403 error when i try to view my website.
floserv.dyndns.org
|
|
|
04-08-2010, 07:25 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
I *really* hope your machine isn't hosted up in the wild
while you're trying to learn the ropes; that would be like
trying to figure out what all those pedals and the wheel
in a car are for while cruising down a highway.
To access index in your users home you'd go
http://localhost/~username/
Please give some detail as to what your ultimate goal is,
not a little (perceived) logical step to get there.
Cheers,
Tink
|
|
1 members found this post helpful.
|
04-08-2010, 08:19 PM
|
#5
|
LQ Newbie
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28
Original Poster
Rep:
|
Goals for my server are as follows.
1. I would like to host a website.
2. I would like to store files on it to backup my desktop
What i have done so fair.
1. I have installed openssh so i can access my server from my room.
2. I have installed webmin (though i do not think i want to use it very much)
3. I installed apache.
As fair as security goes i have only configured ssh.
I have a key auth for ssh, i disabled password login, and i disabled root login, oh and i changed the standard port.
When you say in the "wild" do you mean the internet?
My server is in my garage and i am in my room, the computer in my room is set up on a different router than the server in the garage.
I want to access it from my room so i thought i needed ssh.
So yes i believe it is in the wild.
Last edited by cK`; 04-08-2010 at 08:22 PM.
|
|
|
04-08-2010, 08:44 PM
|
#6
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Well, let's hope your apache is hardened, stable and recent enough ...
So to get to the page you placed in the home of the user on the
server in the garage:
http://your-servers.public.ip or dns-name/~your_username
If the "~your_username" bit is NOT what you want, you should be
able to copy the file(s) from there to your servers web-home using
"sudo cp -r $USER/public_html/* /var/www/htdocs" (or where ever the
web-root is on an Ubuntu machine).
Cheers,
Tink
|
|
|
04-09-2010, 12:18 AM
|
#7
|
LQ Newbie
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28
Original Poster
Rep:
|
Ok so what i did was just edited the default index.html and pasted my own html file.
Anyway so after i did that i typed this
/etc/init.d/apache2 restart.
The output was this
(13) permissions denied: make_sock could not bind to address [::]:80
(13) permissions denied: make_sock could not bind to address 0.0.0.0:80
no listening sockets available, shutting down.
Unable to open logs.
[fail]
But when i go to mydomainname.com my webpage is working.
This error message scares me. The only thing i remember doing was editing the default index.html with nano and copy/pasting my own html code, i saved it then restarted it and got that error message.
Its not effect me now except for the fact that i dont like error messages.
So if anyone knows what i did or whats going on and could fill me in that be great!
thanks!!
Edit: Ok i found i am getting the error because HTTP is using port 80.
How do i change this so the error will go away?
Last edited by cK`; 04-09-2010 at 12:46 AM.
|
|
|
04-09-2010, 12:49 AM
|
#8
|
LQ Newbie
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28
Original Poster
Rep:
|
Eck...
I was not running /etc/init.d/apache 2 restart as sudo
Not executing it as sudo gave me that error.
I guess this thread is solved. Even though i only masked my problem by copy/pasting html code into an all ready used default folder.
Maybe later when i get more experience i will come back to it and try and solve it.
Thanks for your help Tinkster.
|
|
|
All times are GMT -5. The time now is 09:28 AM.
|
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
|
|