Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

Thanks

share|improve this question
    
Please clarify what you're trying to do here. –  duskwuff Jun 16 '11 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 '11 at 0:16
    
I think @Nemo is spot on. –  Captain Giraffe Jun 16 '11 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 '11 at 1:43
add comment

migrated from stackoverflow.com Jun 16 '11 at 13:45

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.