LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Password protect a file for write access (https://www.linuxquestions.org/questions/linux-security-4/password-protect-a-file-for-write-access-676263/)

slimm609 10-14-2008 09:34 AM

Password protect a file for write access
 
Does anyone know a way to password protect or encrpyt a file that would need a password for write access but not read access?

I need to make is readable without a password but still require one for write access. Don't think its possbile but wanted to ask

monsm 10-14-2008 10:20 AM

Hmm, not sure. I know you can do that with openoffice. But I guess in terms of the file system you could set groups with read access and others with write access. far as I know users wouldn't be asked for password though, just given appropriate access depending on their rights.
There might be ways of doing it though.

slimm609 10-14-2008 10:30 AM

The permissions solution wouldn't work. there are other users that would have the same permissions to the file but i dont want them to be able to write to it.

Total-MAdMaN 10-14-2008 10:33 AM

Quote:

Originally Posted by slimm609 (Post 3309807)
The permissions solution wouldn't work. there are other users that would have the same permissions to the file but i dont want them to be able to write to it.

What monsm was suggesting was creating a new group for the users that should have write access to the file.

slimm609 10-14-2008 10:41 AM

Quote:

Originally Posted by Total-MAdMaN (Post 3309809)
What monsm was suggesting was creating a new group for the users that should have write access to the file.

Root has to be the owner and a few people have sudo access to root. Thats why it wont work.
also i dont even want root to edit the file without the proper password

If there is a way to use encryption with 2 seperate keys. 1 for read-only and 1 for read-write that would work but i dont think there is cause of the way encryption works


All times are GMT -5. The time now is 10:58 AM.