LinuxQuestions.org
Review your favorite Linux distribution.
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 08-23-2005, 06:18 PM   #1
tntcoder
Member
 
Registered: Sep 2003
Distribution: Arch
Posts: 89

Rep: Reputation: 15
Apache file permissions


Hi,

Ive finally got apache all working, but whenever a file is put in the htdocs directory via ftp or locally, it gets owner root, group root. And i get file forbidden errors accessing the file from the net. If i chmod the file to 777 it works fine, or set the group manually to nobody/nogroup. But i always have to do it manually.

Ive set the parent folder up with 777, nobody/nogroup but all files within the htdocs folder are inaccessible from the net unless each one is chmod manually.

What am i doing wrong here

EDIT: ive just checked and i think this is an ftp problem, when a file is upload via ftp it is given permissions Forbidden by group & public. Its vsftpd, any ideas?

Last edited by tntcoder; 08-23-2005 at 06:28 PM.
 
Old 08-23-2005, 06:39 PM   #2
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
what user are you using to upload your files? the file permissions should be the same as the user's permissions thats uploading them. That is why using /home/<username>/public_html works really well, you don't come across these probs as often. You may either have to give ur ftp user more permissions which is unsafe or use a public_html dir.

Someone else might have a better idea though
 
Old 08-23-2005, 06:50 PM   #3
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
Any file in /var/www/whatever dir should be readable by apache - regardless who owns them - as long two things are met:

The perms are at least r--
And you start apache as root.
 
  


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
Apache and File Permissions Matir Linux - Security 6 08-13-2005 12:22 AM
File Permissions with Apache Herbalist Linux - Networking 5 06-17-2005 01:39 PM
File permissions with apache deee Linux - Newbie 3 03-31-2004 02:24 PM
Apache and File Permissions notstrider Linux - Networking 1 03-14-2003 11:44 AM
Apache permissions and file locations yesyes125 Linux - Software 1 05-10-2002 11:43 PM


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