LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2006, 04:54 PM   #1
Josh1billion
Member
 
Registered: Sep 2005
Location: WI
Distribution: Fedora Core 9
Posts: 36

Rep: Reputation: 15
Whenever I create a file in /var/www/html/, it is at permission 600 (forbidden)


I just installed Apache and I'm having a little bit of trouble. I think it's more of a Linux thing than an Apache thing, though.

See, whenever I create a file in my /var/www/html folder, it's at the permission 600 (only the Owner can read it). Which means that if I browse to http://127.0.0.1, it will say Forbidden until I manually chmod the file.

There has to be a way to make this automatic, at least in this folder if nowhere else, so I don't have to keep chmodding each file I create on my server?
 
Old 03-18-2006, 05:58 PM   #2
dmartins
Member
 
Registered: Oct 2005
Location: Ontario, Canada
Distribution: Arch, Gentoo
Posts: 98

Rep: Reputation: 15
I seem to recall that the default mask for a file is the permissions of it's parent directory.. Check the permissions on the parent directories.. If the /var/www/html folder has permissions 600, those permissions will be passed to any new files in that directory.

I think this is the way it works
 
Old 03-18-2006, 06:14 PM   #3
Josh1billion
Member
 
Registered: Sep 2005
Location: WI
Distribution: Fedora Core 9
Posts: 36

Original Poster
Rep: Reputation: 15
/var/www/html has 777 (I set it to this myself). /var/www has 777 too (I set this too), and /var is 755 (I think it was like this by default).
 
Old 03-18-2006, 07:51 PM   #4
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
check your umask

type umask and see the results.
The output is exclusive or'd with 777 to set the permissions on new files
 
Old 03-18-2006, 10:24 PM   #5
Josh1billion
Member
 
Registered: Sep 2005
Location: WI
Distribution: Fedora Core 9
Posts: 36

Original Poster
Rep: Reputation: 15
umask says 0002.. what do I do now? I don't understand exactly what you just said.
 
  


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
How do I give a user permission to save files to /var/www/html? rotnay6000 Linux - Newbie 10 07-14-2009 08:45 PM
Directory index forbidden by rule: /var/www/html/ danimaldaisy Linux - Networking 6 02-11-2008 01:32 AM
Creating VSFTPD Full permission User to /var/www/html vibin Linux - General 5 01-03-2006 02:32 AM
help in /var/www/html/!! chidomen Linux - Newbie 4 01-13-2005 11:02 AM
chmod of /var/www/html alTereD Linux - Security 1 12-16-2002 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:41 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration