Is this possible? I know you can protect a .dmg file, but is there a more convenient solution, by using a third party application?


The only way I can think of to do this would be to create a new user with the password you want to use for the folder, then use chmod to set rights on the folder to 700, then you'll use that new user's username and password to access the file.


credit: snazzylabs youtube channel

there is an openssl encrypt / decrypt command (sth like that - i dont remember the exact syntax )

openssl enc -aes-256-cbc -e -in (file path of file to encrypt ~users/user/desktop/filename- drag n drop) -out (filepath of new encrypted file ~users/user/desktop/filename2 )

if the command is right it will ask you for a password

this will keep the initial file (filename) and generate a 2nd file with the name you specified (manually) like in this case (filename2)

keep in mind that the encrytped file does not open if you double click and there is no dialog box or prompt from OS X to enter password and you will need terminal to decrypt it.

you will enter the same command but insted of -e after cbc you will type -d (for decrypt i assume) also in the -in (filepath) you will enter the filename of the encrypted file to be decrytped by the command not the initial filename

openssl enc -aes-256-cbc -e -in (file path of file to DEcrypt ~users/user/desktop/filename2- drag n drop) -out (filepath of new DEcrypted file ~users/user/desktop/filename3

in this example filename is the file to encrypt , filename 2 is the name of the encrypted file generated by the command and filename3 is the name of the decrypted file .

if you dont delete the initial file you encrypted you are going to have 2 files after the openssl enc .... command which isnt any good since all the info in filename is still accessible even if filename2 is encrypted. make sure you can decrypt the encrypted file then delete all unencrypted versions. with this method you will need to run the decrypt command every time you want to access the file and delete the generated decrypted file afterwards and keep the encrypted only .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .