Apache problems

  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago


i have had apache in a long time and it has ben workign fine. but then i whanted to make it easye to update sites and upload files to the server so i decided to install proftpd.
I followed this tutorial:

http://www.freebsd.se/article.php?story ... ry=proftpd

"Its in swedish"

In the ttorial they told me to make a home dit for the ftp "ftp root dit"
and it should be /usr/ftp but i whanted it to be in the httpd dir so i made the ftproot dir under /usr/local/www/
and then i started with the rest of the tutorial. everything worked fine but in the end i was suppose to set promissions of the folders and files with those commands:

$ find . -name "*" -exec chmod 555 {} \;

$ find . -name "*" -exec chown engelbert:engelbert {} \;

$ chmod 700 engelbert/

and their is when it all whent wrong. i can no longer accses any of the homepages.

this is what it says on the browser:
You don't have permission to access / on this server.

btw, i use feebsd.

well i wold be more than happy if any of you culd help me out with this.

and im sorry for my bad english-
thanks in advance // Richard
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2696
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

In englebert your name? Typically, I have root own the files, with the adm group owner.

More importantly, when you chmod 700, you effectively cut off the webuser (whomever you have httpd running as ) from being able to read the static content.

Try adding read rights to the content; 744 should do it. You could specify, provided you have a staging area, the webuser as the owner of the files with read-only perms. That would increase security of the files, though successful operation in the goal here.

Always remember your webuser (as defined in the httpd.conf) must be able to view the files. When in doubt, su - <webuser>, and try to view the files (and directories). If you cannot as the webuser, your site will not function.

Another tip, sometimes apache likes to make 'nobody' the webuser -- I ALWAYS change that. ;) This of course means instantiating another non-loginable account, but that's better than running as nobody. The port for FreeBSD -- IIRC -- instantiates a user for you.

  • ALV
  • Novice
  • Novice
  • User avatar
  • Posts: 30
  • Loc: swe

Post 3+ Months Ago

Thank you for the tips.. i finally made it.

i simply added a new user named apache and edited httpd config to run with the new user and made the user own of http directories and files and added some nice chmod on the files aswell..

many thanks to my m8 who helped me along the way (Alpha|Work)


Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 33 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.