LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 11-09-2003, 05:42 PM   #1
supertechmyers
LQ Newbie
 
Registered: Nov 2003
Location: Norfolk, Virginia
Distribution: Slackware 9.1
Posts: 25

Rep: Reputation: 15
HTML file permissions What is better?


what permissions are best for html and php files that are stored on your server. 755?
 
Old 11-09-2003, 07:46 PM   #2
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1
Posts: 551
Blog Entries: 1

Rep: Reputation: 45
At the most generous, 755. If you can with some files, use 711 (why should you allow would be hackers to read your code if you don't have to)
 
Old 11-11-2003, 02:14 PM   #3
warath
Member
 
Registered: Oct 2001
Location: Ontario, Canada
Distribution: Redhat 9
Posts: 43

Rep: Reputation: 15
I think that 644 would be the safest
Owner: Read/Write
Group: Read
All: Read
You don't want, nor need a user to be able to execute your code, as most HTML pages shouldn't execute ;-)
You want ALL=read so that the Apache server (or whatever server you run) can read and serve the file. Make sure that the parent directory has execute permision for all so that the server can get into the directory.
You can remove all=read, if you set the group owner to the same as your webserver, and leave the read permision on it. Which would be 640 then.


Last edited by warath; 11-11-2003 at 02:16 PM.
 
Old 11-11-2003, 03:05 PM   #4
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1
Posts: 551
Blog Entries: 1

Rep: Reputation: 45
Actually, when suggesting 711, I was thinking of files like PERL scripts, which need execute permissions, but don't need to be read by whoever calls them. If the files don't need execute permissions, then use 644, because the files then need to be readable in order to function. Unfortunately, that allows the user to see contents of your file as well as the result that the file produces.
 
Old 11-12-2003, 12:45 AM   #5
narendra_i
LQ Newbie
 
Registered: Sep 2003
Location: hyderabad
Posts: 12

Rep: Reputation: 1
755 will be better
 
Old 11-12-2003, 11:29 AM   #6
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1
Posts: 551
Blog Entries: 1

Rep: Reputation: 45
Quote:
755 will be better
Why? Could you elaborate please?
 
  


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
saving html from windows editor looses permissions aryehb Linux - Newbie 4 03-24-2005 02:20 PM
Konqueror + file:/usr/share/doc/HTML/index.html jon_k Linux - Software 2 11-25-2003 05:06 AM
HTML permissions narendra_i Linux - Security 1 11-17-2003 11:27 AM
user/group permissions for /var/www/html/ illtbagu Linux - Software 6 11-12-2003 05:29 AM
html permissions AZDAVE Linux - Newbie 5 10-23-2003 09:35 AM


All times are GMT -5. The time now is 05:26 AM.

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