Find the answer to your Linux question:
Results 1 to 8 of 8
Does anyone know how to password-protect a certain folder without having to download some program that lets you do that?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Posts
    4

    Password-protected folders


    Does anyone know how to password-protect a certain folder without having to download some program that lets you do that?

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    ***Moved to Misc***

    Can you be more specific? Are you trying to set a folder unaccessible to a local user? Or is it on a web server? More details please.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    Posts
    4
    No, not on a server (I know how to do That). Just on my local system, I want it to promt me (or anyone else) for a password before letting you see the contents. If that's possible of course.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    I'm not sure about that, but you *can* set the permissions to 700 so that no one can have permission to use it except the owner. That's the closest thing I know that will work.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  6. #5
    Just Joined!
    Join Date
    Jun 2004
    Posts
    4
    Heh, unfortunately not close enough. And you are underestimating me lol I know how to set permissions

  7. #6
    Linux User
    Join Date
    Jan 2003
    Location
    Cardiff, Wales
    Posts
    478

    apache

    I don't think Linux does this without extra software. LInux likes users and groups and that kind of thing not just plain old passwords.

    why not create a folder somewhere and set tight permissions and ownership so that only the apache user can access it. then set up a virtual folder on apache that maps to it and use a .htaccess file to prompt for the password.

    then just access the folder through the web browser.

    I take it you need to keep some stuff secure.

    If you're just hiding stuff on the pc then create a partition somewhere and don't make an entry for it in fstab so you need to manually mount it before use. You could even have a bash script that prompted the user for a word then mounted the drive and opened it in nautilus.
    No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.

  8. #7
    Just Joined!
    Join Date
    Jun 2004
    Posts
    4
    hmm, good idea (apache), thanks

  9. #8
    Just Joined!
    Join Date
    Sep 2007
    Location
    Sweden
    Posts
    1

    Question .htaccess and .password and the command htaccess

    As far as I know you have to set it in the files .htacces and .password but this can probably only be done by the root. Some ISPs such as main has a webbased system for this. Don't if you have to do some thing with the apache server as well or what ever http server you are using. I have tried to do this on my homepage server but haven't got the hang of it yet. Maybe someone can follow this thread and let me know.

    Rosoft




    Quote Originally Posted by kpzani View Post
    I don't think Linux does this without extra software. LInux likes users and groups and that kind of thing not just plain old passwords.

    why not create a folder somewhere and set tight permissions and ownership so that only the apache user can access it. then set up a virtual folder on apache that maps to it and use a .htaccess file to prompt for the password.

    then just access the folder through the web browser.

    I take it you need to keep some stuff secure.

    If you're just hiding stuff on the pc then create a partition somewhere and don't make an entry for it in fstab so you need to manually mount it before use. You could even have a bash script that prompted the user for a word then mounted the drive and opened it in nautilus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •