LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-29-2020, 07:20 PM   #1
bischop
LQ Newbie
 
Registered: Oct 2017
Posts: 7

Rep: Reputation: Disabled
I cant see files under NFS usage, why?


I installed & confiugred NFS on ubnutu 18.04.

Directory /mnt/samba is shared by SAMBA and NFS server.
I'm connecting as a client by Windows 10 on it and:
- I can see/read/write directories & files on samba usages
- I can see directories by NFS usage but I can't see any files inside

What is wrong?

Files /mnt/samba on Linux ext4 partition are:
- directories nobody:nogroup 0777
- files 0777 (.exe files) or 0666 (all others)

Samba usage is configured by /etc/samba/smb.conf as:
Code:
[3.TB.partition.1]
        comment = 3 TB p.1 encrypted partition
        path = /mnt/samba/3.TB/partition.1
        writable = yes
;       browsable = yes
        guest ok = yes
        create mask = 0777
        directory mode = 0777
NFS usage is:
/etc/exports:
Code:
/mnt/samba 192.168.0.0/24(rw,async,no_subtree_check,root_squash)
 
Old 03-01-2020, 04:20 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861
Have you installed NFS support on windows 10? Have a look here -->https://graspingtech.com/mount-nfs-share-windows-10/

NFS support is only available on Enterprise and Pro versions of Win 10.
 
1 members found this post helpful.
Old 03-01-2020, 05:12 PM   #3
bischop
LQ Newbie
 
Registered: Oct 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by camorri View Post
Have you installed NFS support on windows 10? (...)
Yes, I did. But it's not a problem with client - I tested under another Linux system as a client as well.

What I noticed everything is working good but to resolve the problem:
- I did mount data disks with the partitions on it, under
Code:
/mnt/shared
There I got structure:
Code:
/mnt/shared/3.TB/partition.1
/mnt/shared/3.TB/partition.2
/mnt/shared/4.TB/partition.1
/mnt/shared/4.TB/partition.2
Now I mapped all those four partitions directly into:
Code:
/etc/exports
as
Code:
/mnt/shared/3.TB/partition.1    serverIP/24(rw,async,no_subtree_check,root_squash,anonuid=1000,anongid=1000)
/mnt/shared/3.TB/partition.2    serverIP/24(rw,async,no_subtree_check,root_squash,anonuid=1000,anongid=1000)
/mnt/shared/4.TB/partition.1    serverIP/24(rw,async,no_subtree_check,root_squash,anonuid=1000,anongid=1000)
/mnt/shared/4.TB/partition.2    serverIP/24(rw,async,no_subtree_check,root_squash,anonuid=1000,anongid=1000)
So now, I'm able to connect to the server NFS by four different points. I prefer to have one common.. but.. don't know how to achieve it.
Now all files under are visible.

To be honest I don't understand why I was not able to see files inside those all partitions and at the same time I saw directories structure of it.
Maybe some file permissions of the parent directory - but I tried to change it with
Code:
chown nobody:nogroup
and
Code:
chmod 0777
.
Maybe some mount permission in
Code:
/etc/fstab
Maybe some other
Code:
/etc/exports
parameters [1]:
Quote:
nohide
This option is based on the option of the same name provided in IRIX NFS. Normally, if a server exports two filesystems one of which is mounted on the other, then the client will have to mount both filesystems explicitly to get access to them. If it just mounts the parent, it will see an empty directory at the place where the other filesystem is mounted. That filesystem is "hidden".

Setting the nohide option on a filesystem causes it not to be hidden, and an appropriately authorised client will be able to move from the parent to that filesystem without noticing the change.
However, some NFS clients do not cope well with this situation as, for instance, it is then possible for two files in the one apparent filesystem to have the same inode number.

The nohide option is currently only effective on single host exports. It does not work reliably with netgroup, subnet, or wildcard exports.

This option can be very useful in some situations, but it should be used with due care, and only after confirming that the client system copes with the situation effectively.

The option can be explicitly disabled with hide.
But I tried both configurations [nohide, hide].

[1] https://linux.die.net/man/5/exports
 
Old 03-02-2020, 01:48 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
You might want to check this wiki - has helped me when I set it up.
 
1 members found this post helpful.
Old 03-02-2020, 09:19 AM   #5
bischop
LQ Newbie
 
Registered: Oct 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
You might want to check this wiki - has helped me when I set it up.
I initially glanced at the contents ... and there seems to be a solution. I will do the test and write back.
 
Old 03-03-2020, 06:54 PM   #6
bischop
LQ Newbie
 
Registered: Oct 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
That help in my case:
Code:
/etc/exports
Code:
/mnt/shared        192.168.1.0/24(rw,sync,crossmnt,fsid=0)
The crossmnt option is necessary to share exported directories inside an exported directory.
 
Old 03-03-2020, 09:48 PM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Just a note... making everything 777 removes all security from the filesystem. And for a SAMBA export, that can be a disaster as it is how ransomeware takes over.
 
2 members found this post helpful.
Old 03-07-2020, 02:00 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ yes, this needs to be stressed.
bischop, now that you figured out what went wrong, change all that 0777 stuff back to normal values (probably just remove those config instructions and go with default values?).
 
Old 03-23-2020, 05:52 PM   #9
bischop
LQ Newbie
 
Registered: Oct 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
Well, I understand the problem with 777 clearly so now - yes - I can remove it.
 
  


Reply

Tags
files, nfs, ubuntu 18.04, windows 10



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
[SOLVED] NFS mount fails (times out): NFS server is in DMZ, NFS client is in intranet Hiroshi Linux - Networking 2 05-24-2010 10:22 AM
cant boot cant repair, cant reinstall... can i recover my files?? AnimaSola SUSE / openSUSE 4 08-07-2007 07:58 PM
Why cant i see .sxw files? ginda Linux - Software 2 03-18-2005 10:19 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Why cant nautilus see files that are meant for linux???? caleb star Linux - Software 1 01-30-2004 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:30 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