Results 1 to 4 of 4

Thread: How to make one folder accessible only by one user

  1. #1
    Join Date
    Jun 2012
    Beans
    2

    How to make one folder accessible only by one user

    I want to secure one folder e.g /media/disk/confidential
    Only my account should have access to this folder and not other accounts should access this folder.
    I have created other account which doesn't have administrative rights.
    Given folder is on auto mounted file system (ext4).

    Any help is appreciated.

  2. #2
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to make one folder accessible only by one user

    You could run

    Code:
    sudo chown my_user /media/confidential
    sudo chmod og-rwx /media/confidential
    So that you own the folder and are the only one who can read, write, or execute files within it.

  3. #3
    Join Date
    Jan 2008
    Location
    USA
    Beans
    971
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to make one folder accessible only by one user

    Quote Originally Posted by cortman View Post
    sudo chmod og-rwx /media/confidential[/CODE]
    Or just:

    chmod 0700 /media/confidential

    But, OP, please note that file permissions only work when the other users don't have physical access to your box. If they have physical access to your machine, all they have to do is boot a LiveCD and they can view any file.

    In order to get real protection you need to encrypt that directory.
    Occam's Razor for computers: Viruses must never be postulated without necessity -- nevius

    My Blog

  4. #4
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to make one folder accessible only by one user

    +1 for encryption- I encrypt my netbook's partitions for that very reason.

Tags for this Thread

Bookmarks

Posting Permissions

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