The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> Security and Cryptography
|
Formal definitions of Read, Write, and Execute permissions
Discuss Formal definitions of Read, Write, and Execute permissions in the Security and Cryptography forum on Dev Shed. Formal definitions of Read, Write, and Execute permissions Security and Cryptography forum discussing issues related to coding, server applications, network protection, data protection, firewalls, ciphers and the like.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 17th, 2012, 07:01 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 5
Time spent in forums: 2 h 52 m 25 sec
Reputation Power: 0
|
|
|
Formal definitions of Read, Write, and Execute permissions
I am new to web development and after some searching still couldn't really understand the exact meanings of Read, Write, and Execute permissions. I can't go by common-sense meanings because, for example, the World can't see a web page with World/Execute checked and World/Read unchecked but it can vice versa.
|

January 17th, 2012, 07:34 AM
|
|
Contributing User
|
|
Join Date: Jan 2004
Posts: 226
Time spent in forums: 1 Day 16 h 58 m 19 sec
Reputation Power: 10
|
|
|
As a rule 644 (rw-r-r--) permissions must be set for all PHP, HTML and other non CGI scripts/files so the website will work fine, without any errors. CGI scripts must have 755 (rwxr-xr-x) permissions. Also you shouldn't forget about folders permissions. For normal access a folder must have 755 access permissions otherwise a server will not be able to access script/file and execute it. For more detailed answer I need to know which scripts you are executing and what user they are executed by, then I will be able to explain why it should be done in that way.
|

January 17th, 2012, 08:35 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 5
Time spent in forums: 2 h 52 m 25 sec
Reputation Power: 0
|
|
|
Hi Dmitry, I'm currently on a shared hosting plan (probably going VPS or dedicated in the future though), and the only person with access to the website account is me. I'm not familiar with CGI scripts at this point and wouldn't know how to pick them out to ensure they have the proper permissions. At the moment, I know that the site will have HTML, CSS, JS, and PHP files, and also a MySQL database. The site will also somehow integrate an Authorize.net system for e-commerce (I don't know what all that involves yet script-wise).
I know there are a few other security precautions I need to take besides setting appropriate permissions, but at this point just a few questions related to permissions come to mind. From my cPanel File Manager, my directory access starts at /home/my_username/, and of course the folders under this include the /public_html/ web root. So all my related questions are (assuming I'm the only "User," there are no CGI scripts, and a concern for maximum appropriate security):
1. What are all the files I might create that should stay out of the web root?
2. Out of the ones under the web root, are 644 permissions then the lowest that should be set and no lower?
3. Is there also a rule of thumb about permissions outside of the web root?
4. What is the difference between "Group" and "World"?
But if it's not too much more trouble, I still might like to know what Read, Write, and Execute really mean so that I could just deduce the answers to questions like some of these when they come up, given that the answers to these questions haven't made it obvious (to a slow learner).
|

January 17th, 2012, 08:37 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 5
Time spent in forums: 2 h 52 m 25 sec
Reputation Power: 0
|
|
|
(I was trying to give 1 reputation point but apparently I don't know how that works.)
|

January 17th, 2012, 11:39 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 5
Time spent in forums: 2 h 52 m 25 sec
Reputation Power: 0
|
|
|
My host support just now told me about these pages. I'll have to go back and read them later when I have time but they look like they'll fix my confusion. (As currently a new user I'm not allowed to create clickable URLs.)
webhostinggeeks.c-o-m/blog/2009/12/23/understanding-permission-types-for-website-security/
thewebhostinghero.c-o-m/tutorials/linux-file-permissions.html
cyberciti.biz/faq/how-linux-file-permissions-work
|

January 18th, 2012, 04:48 AM
|
|
Contributing User
|
|
Join Date: Jan 2004
Posts: 226
Time spent in forums: 1 Day 16 h 58 m 19 sec
Reputation Power: 10
|
|
 I'm glad that you have sorted out your question. Be free to ask more questions if you have them.
|

January 19th, 2012, 10:58 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 5
Time spent in forums: 2 h 52 m 25 sec
Reputation Power: 0
|
|
|
Thank you, Dmitry. I plan to work overtime on building a startup over the next 3 years or so, and I happily look forward to having this community around and being in this community.
|

January 20th, 2012, 01:19 AM
|
|
Contributing User
|
|
Join Date: Jan 2004
Posts: 226
Time spent in forums: 1 Day 16 h 58 m 19 sec
Reputation Power: 10
|
|
|
Glad that you enjoy being here, I'll try to assist if necessary, so just be free to ask any questions.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|