HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting a file through NFS

 
SOLVED
Go to solution
Samshen
Frequent Advisor

Exporting a file through NFS

Hi,
I want to know, is it possible to export a single file through NFS instead of a whole directory?

Thank you.
5 REPLIES
Torsten.
Acclaimed Contributor
Solution

Re: Exporting a file through NFS

Never thought about that, but I assume it is always based on directories, so you need to export an directory.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   

Re: Exporting a file through NFS

Hi Sam,

Exporting a single file wouldn't be possible,You need to export a complete directory
Steven Schweda
Honored Contributor

Re: Exporting a file through NFS

> [...] You need to export a complete
> directory

Sounds right to me.

You could create a new directory, and put
into it (only) a hard link to the file of
interest. (That might work until someone
replaces that file in its original location.)
Steven E. Protter
Exalted Contributor

Re: Exporting a file through NFS

Shalom,

You can do it.

1) Make the file the only file in a directory.
2) Make the file permissions on the other files 000 so they are invisible.
3) Work with ownership and make the other files member of a group that can not be seen.

Definitely possible. You just can't do it by simply adding an entry to /etc/exports or /etc/dfs/dfstab and running exportfs

It is more work than that.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Exporting a file through NFS

Any particular problem you are trying to solve by only exporting one file? Security?

Steven's hardlink suggestion seems the best solution. Make sure you create that directory on the same filesystem as the original file.