Page 1 of 6 123 ... LastLast
Results 1 to 10 of 55

Thread: Making folders accesible only by password

  1. #1
    Join Date
    Jan 2013
    Location
    Brazil
    Posts
    327

    Default Making folders accesible only by password

    I have an Encrypted /home, and I'd like to know if there's a way of protecting folders with password, like when trying to open other partitions it asks for root password. To understand it a little better:

    I login and let my daughter use the PC, but there's a folder I don't want her to see. If she tries to open it, a prompt "Enter your password" appears and the only with the root (or user account, doesn't make a difference) she can access it.

    Is there a way of doing it?

  2. #2
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: Making folders accesible only by password

    I have a public_html which has some image files and i am hiding the file contents by running chown and chmod on all the folder contents recursively.
    I change the ownership of all the files and folder using chown
    and then remove read /write permission for other users using chmod

    Checking permission
    Code:
    $ls -la  public_html
    total 320
    drwxr-xr-x  2 dartmouth users 32768 Apr 29 09:24 .
    drwxr-xr-x 49 dartmouth users  4096 May  1 08:45 ..
    -rw-r--r--  1 dartmouth users 57101 Apr 22 09:27 ConfigureBrowser.png
    -rw-r--r--  1 dartmouth users 85467 Apr 22 09:23 installTimidity.png
    -rw-r--r--  1 dartmouth users 50720 Apr 29 09:24 Screenshot from 2013-04-29 09:24:19.png
    -rw-r--r--  1 dartmouth users 90173 Apr 22 09:25 SetTimidity.png
    changing ownership of files to root or any other user using option -R
    Code:
    $sudo chown -R root public_html
    root's password:
    $ls -la  public_html
    total 320
    drwxr-xr-x  2 root      users 32768 Apr 29 09:24 .
    drwxr-xr-x 49 dartmouth users  4096 May  1 08:45 ..
    -rw-r--r--  1 root      users 57101 Apr 22 09:27 ConfigureBrowser.png
    -rw-r--r--  1 root      users 85467 Apr 22 09:23 installTimidity.png
    -rw-r--r--  1 root      users 50720 Apr 29 09:24 Screenshot from 2013-04-29 09:24:19.png
    -rw-r--r--  1 root      users 90173 Apr 22 09:25 SetTimidity.png
    Removing access to all other ussers except root recursively
    Code:
    $sudo chmod 600 -R public_html
    checking permission again
    Code:
    $ls -la  public_html
    ls: cannot open directory public_html: Permission denied
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  3. #3
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: Making folders accesible only by password

    Quote Originally Posted by amarildojr View Post
    If she tries to open it, a prompt "Enter your password" appears access
    Nautilus sort of complains. Don't know how Dolphin will behave. I don't know whether this approach will work if you /home is encrypted

    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Making folders accesible only by password

    On 2013-05-01 05:26, amarildojr wrote:
    > Is there a way of doing it?


    You need separate encrypted partitions.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

  5. #5
    Join Date
    Jan 2013
    Location
    Brazil
    Posts
    327

    Default Re: Making folders accesible only by password

    Quote Originally Posted by robin_listas View Post
    On 2013-05-01 05:26, amarildojr wrote:
    > Is there a way of doing it?


    You need separate encrypted partitions.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)
    I guess it's the only solution since only one account is used in this machine.

    Thanks.

  6. #6
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default Re: Making folders accesible only by password

    Consider enable a USER login account for your daughter ?


    Found set up USER accounts for various children and adults was my easiest security solution.

    Set access permissions to yours however you like.


    Accounts and content take up little room, if did could limit their size, so various childen and other adults each have their own /home.


    Can set permissions with either NO ACCESS, or LIST ONLY, READ ONLY, or complete read and write access.

  7. #7
    Join Date
    Jun 2008
    Location
    where I am is where I am
    Posts
    1,162

    Default Re: Making folders accesible only by password

    Though I don't know how an encrypted partition would act on this I submit Truecrypt for your consideration. Also there is Realcrypt that's in the Packman repos. I have found that Realcrypt & Truecrypt work well one can( as I have) open a file I've done in one with the other & vice versa.
    We are what we think.
    All that we are arises with our thoughts.
    With our thoughts we make the world.

    My 64 bit: Gateway 5670 UPDATED | RADEON RX 570 |CPU AMD - Ryzen 5 1600
    Opensuse Tumbleweed Plasma 5

  8. #8
    Join Date
    Jan 2013
    Location
    Brazil
    Posts
    327

    Default Re: Making folders accesible only by password

    Quote Originally Posted by Sagemta View Post
    Though I don't know how an encrypted partition would act on this I submit Truecrypt for your consideration. Also there is Realcrypt that's in the Packman repos. I have found that Realcrypt & Truecrypt work well one can( as I have) open a file I've done in one with the other & vice versa.
    I'd like to encrypt a folder (or more). Once the access to the folder is permitted then you can see all it's contents. There was a program on Windows that encrypted folders/processes, every time you'd try to open that folder/process it said "You do NOT have access", so in order to do that you needed to exit the blocking software.

    What I want to do is just like when opening partitions and, for what I could see, it seems the best way to do so, encrypt a partition.

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Making folders accesible only by password

    On 2013-05-01 08:16, amarildojr wrote:

    > I'd like to encrypt a folder (or more). Once the access to the folder
    > is permitted then you can see all it's contents. There was a program on
    > Windows that encrypted folders/processes, every time you'd try to open
    > that folder/process it said "You do NOT have access", so in order to do
    > that you needed to exit the blocking software.


    With YaST you can create user accounts each with their own encrypted
    homes, which I think are loop mounted, LUKS encrypted, filesystems on a
    single partition.

    If you are using a single user for two persons, then you need to do it
    manually; either a separate encrypted partition, or a loop mounted file.
    YaST can do both. But activating them is not automatic on trying to open
    the "directories".

    Truecrypt is another method, but proprietary.


    Of course, the typical way is just having an account per person.
    Adjusting the permissions stops normal people from looking, but having
    access to the computer and the root password means they can access the
    files if they want.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

  10. #10
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,806
    Blog Entries
    14

    Default Re: Making folders accesible only by password

    What is mine stays in my homedir, the kids have their own. And, since linux is multi-user, they all have a session open on my server workstation, which is in the living room. Which allows encryption on a human user level. The way it's designed to be.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Page 1 of 6 123 ... LastLast

Posting Permissions

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