LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-19-2019, 06:19 AM   #1
maggo123
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Rep: Reputation: Disabled
NFS Export - access of subdirectories


Hi,

I exported /srv/nfs

/etc/exports
/srv/nfs/ *(rw,no_root_squash,fsid=0)

I can mount /srv/nfs and i can see the Subfolder P01. However, under P01 there are additional subfolders which i canīt see from the client. What i am doing wrong?

Thanks!

PS: Sorry - i am a noob
 
Old 01-19-2019, 06:49 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,615

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Everyone is a noob at some time. Do not worry about that.

What ownership and permissions are on these folders and subfolders? Perhaps the permissions are at issue.
 
Old 01-19-2019, 08:12 AM   #3
maggo123
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi,

thank you!


Those are the permissions of P01

drwxr-xr-x 9 root root 122 Jan 19 10:10 P01


Those are the permissions of the subfolder

drwxr-xr-x 2 root root 6 Jan 17 18:57 Music
 
Old 01-19-2019, 08:50 AM   #4
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by maggo123 View Post
Hi,

I exported /srv/nfs

/etc/exports
/srv/nfs/ *(rw,no_root_squash,fsid=0)

I can mount /srv/nfs and i can see the Subfolder P01. However, under P01 there are additional subfolders which i canīt see from the client. What i am doing wrong?
Is that the only line in your exports? Reason I ask is because if you have more than one export with same fsid, it will cause problems.
 
Old 01-19-2019, 09:26 AM   #5
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,789

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Are they simple subdirectories i.e. in the same filesystem?
Code:
df /srv/nfs /srv/nfs/*
 
Old 01-19-2019, 11:13 AM   #6
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Hello maggo123 - welcome to LQ.

I find that the following options work well for me when exporting entire directory trees:

Code:
FROM MY /etc/exports FILE:

.....

/dir/subdir xxx.xxx.xxx.0/24(rw,nohide,insecure,no_subtree_check,async)

....
The first string in the options I use is simply the IP address range to which I permit access from nfs clients. The meaning of the other options can be easily looked up, so I'll leave that part to you.

The Arch Linux wiki entry on nfs is an excellent source of information.

Make sure that you check the permissions on the server, as recommended by wpeckham in post #2.

Let us know how it goes.
 
Old 01-19-2019, 11:15 AM   #7
maggo123
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dc.901 View Post
Is that the only line in your exports? Reason I ask is because if you have more than one export with same fsid, it will cause problems.
Jepp, thatīs the only entry. For what is The FSID used?
 
Old 01-19-2019, 11:16 AM   #8
maggo123
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
Hello maggo123 - welcome to LQ.

I find that the following options work well for me when exporting entire directory trees:

Code:
FROM MY /etc/exports FILE:

.....

/dir/subdir xxx.xxx.xxx.0/24(rw,nohide,insecure,no_subtree_check,async)

....
The first string in the options I use is simply the IP address range to which I permit access from nfs clients. The meaning of the other options can be easily looked up, so I'll leave that part to you.

The Arch Linux wiki entry on nfs is an excellent source of information.

Make sure that you check the permissions on the server, as recommended by wpeckham in post #2.

Let us know how it goes.
Thanks - will give it a try
 
Old 01-19-2019, 01:12 PM   #9
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by maggo123 View Post
*(rw,no_root_squash
No answer to your problem, but I admit the combination of rw and no_root_squash gives me the shivers. This means that every system that
a) can see the share (and thus mount it - you do not restrict it)
b) with a user that can become root or has sudo rights
can modify or delete files ON the share, as they now got superuser rights ON your share.

In my network no_root_squash is only used on read-only exports (so that shares honor the suid and/or sgid bits on executables).
Code:
/opt  192.168.178.0/24(ro,async,no_subtree_check,no_root_squash)
I once had a case where a remote University didn't restrict ITS NFS exports, so that I could mount them even at our location in Delft. Luckily I did mount it read-only so even in error I couldn't mess up their system (the export was meant for their students only).
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list all directories and subdirectories user & group permissions and export to a file fdzone10 Linux - Security 14 04-10-2015 12:12 AM
[SOLVED] fstab or export options needed to write to an nfs mounted ntfs export chief427 Linux - General 2 07-21-2011 07:07 AM
xfs, inode64, NFS export, no_subtree_check and "Stale NFS file handle" message mcacciagrano Red Hat 1 01-16-2011 03:25 PM
export NFS mounted file system via NFS smkamene Linux - Networking 3 02-10-2009 03:12 PM
Mounted NFS share denies access to subdirectories anvilravine Linux - Server 7 10-04-2007 12:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration