You are not logged in.
Quoting man mount (bold text mine):
mount -t type device dir
This tells the kernel to attach the filesystem found on device (which is of type type) at the directory dir. The option -t type is optional. The mount command is usually able to detect a filesystem. The root permissions are necessary to mount a filesystem by default. See section "Non-superuser mounts" below for more details. The previous contents (if any) and owner and mode of dir become invisible, and as long as this filesystem remains mounted, the pathname dir refers to the root of the filesystem on device.
Does it implies that the previous ownership/mode/content becomes irrelevant right ?
Meaning, that once anything is mounted over any given directory, the mount "replaces" the previous ownership/mode/contents with its own right ?
So if I get allow access by the mount nothing in the underlying directory will prevent me accessing the mount right (even if the underlying directory denies me access) right ?
At this point this can seem far to obvious but I think it is a concept I didn't already take it for granted, so better late than never.
Last edited by dawnofman (2022-04-27 05:48:12)
Offline
Yes. If a path is used for a mount, that parth is referring to the mount, not to the directory stored int the filesystem.
Offline
Yes. If a path is used for a mount, that parth is referring to the mount, not to the directory stored int the filesystem.
Perfectly clear. Thanks for your reply mpan ![]()
Offline