Can I lock Linux folders and programs with a password?
Question by Blake Barker /

Is there a way to lock a browser or a specific folder with a passowrd? Just like I can on my Android, simply lock Apps with a custom passowrd. Then the user must enter the password before launching the program or accessing the folder.

Any ideas?

Browse other questions & answers in the category ; tagged , , , , ; or ask your own question.

Comments for this Question are closed.

If you are looking for help, please ask a new question.

We will be happy to help you!

Answers (6)
  • fallen heart

    U can’t password lock a file onlinux but u can change its permission so that anyone else niether reads it nor deletes it look for chmod command chmod +rwx to add permission chmod -rwx to remove permissions (r= read w =write x= execute)

  • Deekshith Allamaneni

    Use password protected 7zip file and also check the option to encrypt file names for better security.

    Actually, zip format also has this option to password protect but it cannot encrypt file names.

  • Amit Sinha

    you can’t lock folder but alternatively you can restrict access to certain files where the files can be opened, edited or deleted by authorized user

  • susendeep dutta

    For browser,most of the Linux distro comes with Firefox browser as default.So,follow the steps mentioned in the link below –

  • ha14

    Encrypt Folders (Ubuntu Linux)
    To encrypt folders on Linux Ubuntu there is a simple program called Cryptkeeper which, while active, lets you mount and dismount password protected folders.

  • Devendra Kumar

    This question is being asked by many Linux users on various forums. Today I searched on Google and found this solution on

    You can password protect a zip file. Proceed as follows:

    Create a directory for this experiment, and name it test.
    Copy a few files and paste them into this directory so it isn’t empty.
    Now open a terminal and enter:
    $ zip -e -r test test
    Enter password:
    Verify password:
    Delete the directory test.

    Now you have a file which is password protected.

    zip with -e option encrypts the contents of the zip archive using a password. This encrypts with standard pkzip encryption which is considered weak.

    However, the job of protecting the file is done, because even the root user needs the password or should be a hacker to decrypt.