reemcs wrote:Now how can I protect the PDF files in the server from developers ? I don't want developers (even me) to open the files from the server if they want to see the files they can login into the system and see the files (if they have the permission).
The problem is that there has to be someone who can acquire root access in order to do the admin work required, and that person can therefore access such files, bypassing server-level security.
NogDog's suggestion of encrypting the files such that the authorised user submits the secret key (over a secure channel, i.e., using SSL/TLS) is secure, at least unless the server administrator is able to install a backdoor to feed him/her the secret keys that were submitted. Furthermore, it is inconvenient. NogDog's musing about placing the secret keys in a database would be more convenient, but in order for the secret keys to be used, the code must have access to the database, hence the server administrator will have access to the secret keys.
I guess you could have two server administrators, and then require them to manage the server together. This way, they would have to collude, which reduces the chance of a rogue server admin being successful. I don't know how you would enforce this in practice though... somehow they each share half of the SSH private key? lol. It is even worse if every developer has admin access to the production server, but a normal staging setup with only a select few trusted with access to the separate production server should be a sane way out.
For reducing the chance of a backdoor from being installed in code, code reviews should be done, but of course while this could stop a rogue developer (unless they collude, but then with version control you have evidence that could be used to fire them and maybe even take legal action), it does nothing to save you from a rogue server admin.
Maybe the easiest way would be to institute a policy of client-level encryption, i.e., everyone encrypts their files before uploading. On the other hand, IT personnel with TeamViewer access could spy on them...