Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6981261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:08:01+00:00 2026-05-27T18:08:01+00:00

When I tried to simulate the permission system under Linux, some strange things came

  • 0

When I tried to simulate the permission system under Linux, some strange things came about.

I created a directory ‘main’ by user ‘normal’, and created directory ‘aha’ which permission is 700 using root.

so the owner of ‘main’ is ‘normal’, if the permission is 755, I can delete ‘aha’ just using ‘normal’ user although its owner is root.

but when i put a file in ‘aha’, everything is changed. I can not remove ‘aha’ due to there’s still a file in it.

so, my question is, since ‘aha’ is 700 by root, how can ‘normal’ know it’s empty or not?

My further question is : what does read permission of a directory really mean?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:08:02+00:00Added an answer on May 27, 2026 at 6:08 pm

    Think of a UNIX directory as a drawer of index cards in the library catalog.

    In order to know what books there are, you need read permission on the “drawer”. In order to create or remove new “books”, you need write permissions (which give you ability to put new cards, or remove existing cards from the drawer). In order to “traverse” the directory to a lower level “sub-drawer”, you need execute permission on the drawer itself.

    If you already know that book /foo/bar/baz exists, you don’t need read permissions on /, /foo or /foo/bar, but you do need execute permissions on all of them.

    A given book could be referenced by multiple “cards” in the same or separate “drawer” (that’s hard links).

    A “card” can reference another card (that’s symlinks). Symlinks could became “dangling” (if the other card is removed).

    When a book is not referenced by any card in any of the drawers, it “evaporates” from the library.

    since ‘aha’ is 700 by root, how can ‘normal’ know it’s empty or not

    Well, one way is to try to remove it. If you succeed, it must have been empty. If it was not empty, “normal” can’t find out anymore than that, since “normal” can’t read the directory, and therefore can’t find how many cards are in that “drawer”, or what they are called.

    Update:

    why do you need execute permissions to traverse a directory.

    Because that’s the definition of the eXecutable bit for directories. Since you can’t reasonably execute a directory, that bit would be wasted otherwise. No, the . and .. files have nothing to to do with the execute bit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can jquery click event simulate mousewheel up and down? I tried to reach some
Tried a bunch of things but I can't get it to work consistently amid
Tried to install some program, it gives above message requiring 1.1.4322. BUT as the
tried to research on that but sometimes I seem to lack some googling skills...
I want to simulate user input to a WPF TextBox. I want to input
I'm attempting to simulate a certain physical system. In order to propagate solutions I
I'm trying to simulate some software in a browser window for training purposes. When
I'm trying to simulate behavior of os.system with Popen and waitpid on Ubuntu and
I have some code that uses dispatchEvent to simulate clicks and the same exact
I tried to simulate IF() .... ELIF .... ENDIF in assembly for PIC16F84, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.