LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 04-08-2010, 04:29 PM   #1
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Rep: Reputation: 15
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!
 
Old 04-08-2010, 04:55 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,966
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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 04:56 PM.
 
Old 04-08-2010, 06:22 PM   #3
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
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
 
Old 04-08-2010, 06:25 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,966
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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.
Old 04-08-2010, 07:19 PM   #5
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
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 07:22 PM.
 
Old 04-08-2010, 07:44 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,966
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 04-08-2010, 11:18 PM   #7
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
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-08-2010 at 11:46 PM.
 
Old 04-08-2010, 11:49 PM   #8
cK`
LQ Newbie
 
Registered: Apr 2010
Location: Orange
Distribution: Unbuntu Server 9.10
Posts: 28

Original Poster
Rep: Reputation: 15
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.
 
  


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
Looking for help understanding filesystems and permissions brockangelo Linux - Server 1 03-15-2009 12:36 PM
Apache file permissions problem. {Apache/2.2.6 Fedora 8} hacker supreme Linux - Server 5 01-31-2008 03:26 PM
Understanding permissions veeruk101 Linux - Newbie 3 07-18-2007 04:21 PM
Understanding File Permissions username132 Linux - Software 13 04-03-2006 04:42 AM
Lack of permissions messenger *BSD 0 05-09-2004 11:09 AM


All times are GMT -5. The time now is 05:44 PM.

Main Menu
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