Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I determine if /tmp is a mounted NFS share on Solaris?

The issue at hand stems from this SO question, where Jonathan Leffler commented that

...
If your /tmp file system is NFS mounted (unlikely, but not impossible), then root has few privileges on that file system.

share|improve this question

migrated from stackoverflow.com Feb 21 '12 at 7:20

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

    
What's the real problem you're trying to solve? –  Ignacio Vazquez-Abrams Feb 21 '12 at 6:54
    
Somebody pointed out that root user id might have limited permission inside /tmp folder when /tmp folder is mounted on NFS and in my case i was not able to delete some files from /tmp folder even by root user id . So i wanted to check that –  Ritesh Feb 21 '12 at 7:00
    
You're going to have to explain a little deeper than that. –  Ignacio Vazquez-Abrams Feb 21 '12 at 7:01
    
Not all NFS have that problem, only those with root squash enabled have that. –  J-16 SDiZ Feb 21 '12 at 7:05
add comment

3 Answers 3

On both Solaris and Linux, this will show the file system used by /tmp:

mount | grep /tmp

/tmp might not be a mount point but just a subdirectory in /, you can figure it out with:

df -k /tmp

In this latter case, to know the root file system, use

mount | head -n 1
share|improve this answer
add comment

On Solaris and Linux do:

mount -v | grep nfs | grep tmp

If your /tmp actually is mounted on NFS it will show up in the output.

share|improve this answer
add comment

I think

findmnt -t nfs /tmp

would do this.

share|improve this answer
    
On which Solaris? –  Karlson Feb 24 '12 at 19:05
    
I can't see where this is stated in the question. This however works here on my centos 6 machine. no reason to rate down. this answer is not wrong. –  l1zard Feb 24 '12 at 20:44
    
The question is tagged solaris –  Karlson Feb 24 '12 at 20:47
    
Its also tagged linux. ;) How should i know which one is relevant when its not stated in the question? however lets leave it as that. –  l1zard Feb 24 '12 at 20:51
    
Assume both are. –  Karlson Feb 24 '12 at 20:52
show 1 more 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.