Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    how to change root permission directory....??

    how can i make that the root and user account cant access the some folder..?? even i set the user permission to lock the folder but the root still can access the folder...

  2. #2
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Hello and Welcome!

    You won't be able to keep root from seeing or accessing a file. Root has access to absolutely everything on your computer.

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  3. #3
    I am going against one of my pet peeves, but I question the point of having a directory that absolutely no one can access, ever. What I mean by this is if there was a way to prevent the users and root from seeing a directory, the contents would be stored there without the possibility to ever access them again because once root loses the permissions for the files, it would not be able to modify the permissions again to gain access. Of coarse this is all theoretical.

    Perhaps if you could expand on what you are trying to accomplish in more detail there might be an alternate solution. One suggestion, while not fool proof, is to hide the directory. This will not necessaraly keep people out that know linux, but will keep the casual user from seeing it. To hide a directory by using 'mv /path/to/directory /path/to/.directory" putting the period before the directory name. You can also do a 'chmod 000 /path/to/.directory', but root will still have permissions on it.

  4. $spacer_open
  5. #4
    Linux Guru
    Join Date
    Oct 2007
    Tucson AZ
    Use the zip command on a folder. I would suggest you create a Test folder and put some test files in it. Run the command from the directory in which the folder exists.

    zip -e -r Test Test
    You will be prompted to enter a password. Enter non-root, non-user password. Hit the Enter key. Verify the password. I would write it down somewhere. This will create a zip folder named in the same directory. The original Test folder will still be there. Move the original Test folder to another directory and unzip the file

    unzip Test
    You will be prompted for the password you created and the file will be unzipped and accessible. You won't be able to unzip it with your normal user password even if it is in the users /home directory. Root password will not unzip either. If you really want to do this, you will need to delete the original Test folder. I came across this method when I was googling for 'password protect a directory'. I can't think of too many uses for this and am not sure if it is what you are looking for. Posting more details on why might help.

Posting Permissions

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