LinuxQuestions.org
Help answer threads with 0 replies.
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 04-28-2003, 12:54 AM   #1
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Rep: Reputation: 45
chown command help


I was trying to install abyss webserver and whenever I tried to access my webpage I got a 403 forbidden error. This is the explanation that I got from help and support of aprelium technologies -

"When a user runs the web server, the web server cannot access files that user doesn't have the right to access. So the problem is that your htdocs files are owned by another user than the one running the web server.
Try solving that issue by correctly setting the ownership of files in htdocs/ using the command chown"

My question is that how can i change the ownership of that folder using chown? I Installed it as root so I am assuming the owner is root? ...

thanks
 
Old 04-28-2003, 12:58 AM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
ls -l to see who owns it...
chown web directory
to change 'directory''s owner to 'web'
chown web.web directory
to change owner and group to 'web'

Make sure that your webpages are world-readable
This link should provide all the detail you need on file ownership and permissions:
http://badcomputer.no-ip.com/linux/permissions.bot
 
Old 04-28-2003, 01:01 AM   #3
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Original Poster
Rep: Reputation: 45
chown: `web': invalid user ??
 
Old 04-28-2003, 01:09 AM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
That was an example my friend....you will want to change the owner to someone who exists

More to the point: "When a user runs the web server, the web server cannot access files that user doesn't have the right to access"

so make sure that your webpages are world readable....you most likely do not need to change the owner.

ls -l your htdocs directory and make sure the files have read access for everyone.
 
Old 04-28-2003, 01:21 AM   #5
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Original Poster
Rep: Reputation: 45
Thank you very much..turns out that conf file had nobody as the user while my system doesnt have nobody..everything is fixed now. Another question i wanna ask you is that I alredy have ftp server running and i have dns name from no-ip. Now, to start webserver do i need to get a new account or will http server run under the same url?..your help is appreciated
thanx
 
Old 04-28-2003, 01:34 AM   #6
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
They will both work with the same ip.

If you use a dedicated ftp client, then you would put "hostname.no-ip.com" to access your ftp site. If you wanted to use a web-browser you would use "ftp://hostname.no-ip.com to access yer ftp site.

So in a few words, no, you do not need a seperate domain name for each...


PS: you aren't running your server as root are you? That is a very big security risk. Better to create user 'nobody' than run it as root.

Last edited by bulliver; 04-28-2003 at 01:37 AM.
 
Old 04-28-2003, 01:45 AM   #7
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Original Poster
Rep: Reputation: 45
I changed the file permissions and made is readable by the owner, group and others. Now i can access my webpage using localhost but if i try to connect using my ip address (web browser) ex. http://ip.address it returns a connection refused message even though my server is running. I even tried the dns ftp://my.dnswhatver and it works but http://my.dnswhatever says connection refused. What could this mean?
 
Old 04-28-2003, 01:46 AM   #8
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Original Poster
Rep: Reputation: 45
ignore the url's in my last post
 
Old 04-28-2003, 07:06 PM   #9
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Make sure that your <ServerName> directive is either your domain name,
or your ip address. If you use the domain name you will need to put a line in your /etc/hosts file along the lines of:
11.11.11.11 hostname.whatever.no-ip.com hostname
so that your ip gets resolved to your computer, but of course put in your specific info....
 
Old 04-28-2003, 10:52 PM   #10
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Original Poster
Rep: Reputation: 45
Hmm..I looked at that /etc/hosts file and this is what i have in there..
127.0.0.1 localhost.localdomain localhost

should I add my web server port number followed by the DNS? ex.
127.0.0.1:8000 hostname.whatever.no-ip.com hostname
Sorry I am a newbie..
many thanks
 
  


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
Chown command giving invalid user ServerStorm Linux - Software 6 03-23-2010 02:42 AM
!!!! Urgent, using chown command ? AQG Linux - Security 8 08-12-2005 03:21 PM
permissions messed up chown command used tsayles21 Debian 3 03-30-2004 08:38 PM
I Have a problem with the CHOWN command AnnePeter Linux - Software 5 03-12-2004 07:37 AM
So... I used Chown command and screwed my pc... Nosram Linux - Newbie 3 01-20-2004 06:09 AM

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

All times are GMT -5. The time now is 12:39 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