Score:0

padlock on directory icons may be missing

br flag

Suppose I have myDirectory which contains files and directories and I issue the command...

chmod --recursive a-w myDirectory

nautilus will display a padlock on the icon of myDirectory. There is no padlock on the directories within it. Why not?

Ronin Hunter avatar
my flag
The Nautilus file manager indicates that the directory is read-only, which means that you cannot modify or delete any file or subdirectory within that directory. It does not indicate the permission of the files and subdirectories within the directory. You can verify the permissions of the directories within `myDirectory` by running the `ls -l` command in a terminal or by checking their properties in Nautilus.
br flag
@Ender Why doesn't a read-only subdirectory have a padlock?
Ronin Hunter avatar
my flag
A read-only subdirectory means that the files within that directory can be viewed, but cannot be modified or deleted. The lack of a padlock on a read-only subdirectory reflects a different ways a file or a directory can be protected
br flag
@Ender but they're not protected in different ways. Before issuing the command the permissions on myDirectory are `drwxrwxr-x` which is the same as the permissions on myDirectory/subDirectory. Then after issuing the command the permissions are `dr-xr-xr-x` for both myDirectory and myDirectory/subDirectory.
ec flag
@H2ONaCl, your observations are correct: Nautilus appears to only show a padlock on parent folders, while sub-folders (though inheriting the same permissions) do not. As an exercise, you can create a series of nested folders (e.g., `mkdir -p test/test1/test2`), and then set the `test2` folder to limited permissions. The result is that you'll see that folder with a padlock. However, if you move up to its parent (`test1`) and then limit permissions there, the padlock icon on `test2` is gone, and the padlock is now on `test1.` Seems to be a strange design thing... or a bug.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.