Find the answer to your Linux question:
Results 1 to 3 of 3
Is there a ownership for a directory that I could use to deny access to the contents or from at least editing them? I set the access permissions to 000 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    12

    Lightbulb Is there a ownership to deny access?


    Is there a ownership for a directory that I could use to deny access to the contents or from at least editing them? I set the access permissions to 000 I do this in the bash as follows

    Code:
    #!/bin/bash
    
    chmod 000 /var/mobile/Documents/Archives
    chown root:nobody /var/mobile/Documents/Archives
    What would I need to do to make sure no one can access the directory contents and edit the contents which ever is the easiest?

    How would someone go about setting a password for this because I know .htaccess and .htpasswd don't work for mobile I've done tried?

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    setting a dir/file to 000 would prevent read/write/execute permissions for all users, except root. if they have root, they can do anything.

    if they are not root, but they have access to a 000 dir/file, then...is this not a native Linux filesystem?

    why do you mention .htaccess/.htpasswd files? they are for restricting access to a directory or file being served by a web server.

  3. #3
    Just Joined!
    Join Date
    May 2012
    Posts
    43
    Man pages are your friend.

    Code:
    chmod a-rw /var/mobile/Documents/Archives
    This will deny read-write access to everyone.

Posting Permissions

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