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 |
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 |
chown: `web': invalid user ??
|
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. |
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 |
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. |
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?
|
ignore the url's in my last post
|
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.... |
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 |
All times are GMT -5. The time now is 12:11 PM. |