4

Is there a way to get mount point permission. after filesystem is Mounted.

Thanks

4
  • 1
    Please clarify what you're trying to do here.
    – user15323
    Jun 16, 2011 at 0:09
  • 1
    @duskwuff: I think he is asking if he can see the permissions on a directory after another file system has been mounted there. I believe (a) the answer is no and (b) the question is off-topic
    – Nemo
    Jun 16, 2011 at 0:16
  • I think @Nemo is spot on.
    – Captain Giraffe
    Jun 16, 2011 at 0:18
  • @duskwuff I want to make sure all mount point owned by root:sys with permission 755. once file system is mounted we can't get mount point information
    – sfgroups
    Jun 16, 2011 at 1:43

2 Answers 2

1

There is no way to examine the mount point once a filesystem is mounted there. The inode is remapped deep within the kernel and the original attributes are not needed anymore.

The only hack around this (that I can think of) is to open the raw volume and parse the volume for the directory. It might be possible to mount the containing volume again (at a different mount point) and then examine the directory. However, either it won't be possible to doubly mount the volume, or doing so would get wires crossed with the already mounted instance and the mount point would again be hidden. A few simple experiments would determine the feasibility of this very hair-brained scheme.

Your language is not clear: "When filesystem mounted". Of course, before the mount occurs, it is trivial to determine the mount point permission. During the mount makes no sense. After the mount is explained above.

2

You can remount the filesystem with -o bind and examine the directories there. For instance to check the /usr mount directory on the root filesystem:

mount -o bind / /mnt
ls -ld /mnt/usr

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .