473,394 Members | 1,751 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Security questions regarding password protected ZIP files

Yay guys!

I hope you all are having a warm fuzzy loveable day.

The following questions are kind of related to this thread:
Protect files (on web server) from web admin.

If one has password protected zip file:
1) where would the content temporary be extracted to (probably the OS designated temp directory, right?)

2) would the extracted content be protected? That is, would the extracted zip content (files and folders):

2.1) be hidden? (i.e. you can't see the files and folders)

2.2) not be possible to copy? (i.e. regardless if you can see the files and folders or not, you can't copy the extracted content)

Then there is the question of performance:
  • Would PHP extract the zip files for each request?
  • Or would the first request for the content be extracted and all following requests use the same extracted content?

Does this make any sense? I hope so.
Nov 8 '07 #1
2 2558
Atli
5,058 Expert 4TB
Hi.

Just my $.02...

If one has password protected zip file:
1) That would depend on the class / extension you are using to un-zip your files. I would assume you would have a choice.

2) would the extracted content be protected? That is, would the extracted zip content (files and folders):

2.1) Nothing is hidden from the root user of your OS. So if the files will be un-zipped onto the hard-drive the root user could read it. But you would be able to un-zip them into a folder outside the web-root, so it could not be directly downloaded by HTTP clients.

2.2) If you can see a file, you can copy it (one way or another). And as with point 2.1, the root user can pretty much do everything. You should also be aware that PHP is ofter run by a 'nobody' user, so every file PHP creates should be protected from other users of the system.

Then there is the question of performance:
  • This would be the ideal security arrangement, but would result in very poor performance.
  • This would be the ideal performance arrangement, but would leave the files unprotected from the root users, and any other user that has access to it.
Nov 9 '07 #2
Yay Atli! Thanks for your input!

1) That would depend on the class / extension you are using to un-zip your files. I would assume you would have a choice.”

Honestly. I did not see that one coming. I have been yearning to bring into play the new flashy PHP 5.2 ZIP support with all its super shiny glory for a while now, alas I have not come any closer upgrading to 5.2 yet.

Anyhow, it was the fallow up question that was of main interest:

2.1) Nothing is hidden from the root user of your OS. So if the files will be un-zipped onto the hard-drive the root user could read it. But you would be able to un-zip them into a folder outside the web-root, so it could not be directly downloaded by HTTP clients.

2.2)
If you can see a file, you can copy it (one way or another). And as with point 2.1, the root user can pretty much do everything. …”


However…

“This would be the ideal performance arrangement, but would leave the files unprotected from the root users, and any other user that has access to it.”

So basically it comes down to my two last questions? Performance VS security. If I have understood you correctly I should be able to do what ever I was trying to do, albeit it could come at a cost of losing performance.

“You should also be aware that PHP is ofter run by a 'nobody' user, so every file PHP creates should be protected from other users of the system.”
Sneaky. A user… With no name, you say. Thanks, I’ll keep a look out for that shifty thing.

I have a lot to learn in this area. I have been scratching the surface on compressing, caching and stuff. I want to apply these techniques to improve performance. I was hopping that I could use them to perfect security too. It seems that the easiest way would be to set up my own server ;)

Thanks your “PHP variable”-input (but you are not allowed to have dots in the var name!)
Nov 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: chris | last post by:
im just starting to learn how sessions work and how to use them my question is if im geting a username and password from a visitor is it secure to store that information in a session variable or...
7
by: PaulThomas | last post by:
I am fighting with XP-Pro and VS.Net trying to allow some of the pages in my application to be accessable by 'all' I am using <authentication mode="Forms" /> and if I Login - everything works...
1
by: The Eeediot | last post by:
Hello, ASP.NET gurus! I have read many pages on setting up a login screen to access a number of web pages using Forms Authentication and I am still trying to wrap my brain around the whole thing. ...
14
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
2
by: Tammy | last post by:
Hello - I have read many threads regarding back-end security and have found them all useful. I have a couple of (what seem to be basic) questions: I have a secured front-end and back-end...
2
by: Regnab | last post by:
I'm creating a database that will be used independently at different sites (in the same company). Given the fact that there will be inevitable changes down the track, I'm trying to work out the...
2
by: =?Utf-8?B?SmlybyBIaWRha2E=?= | last post by:
Hello, I hope I got the correct group about security issues I am having for an ASP.NET 2.0 application. I have a web app hosted on a server with Windows Server 2003 (IIS 6.0) which is on a...
2
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.