473,420 Members | 1,547 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,420 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 2561
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.