- Монтирование nfs шары — failed: Permission denied
- Permission Denied with mounting NFS with Webmin (Mac OSX + Ubuntu Setup)
- The Goal
- Ubuntu Setup
- Mac OX 10.9 Laptop Setup
- Edit:
- 1 Answer 1
- Thread: Client mounts NFS share, but permission denied when browsing
- Client mounts NFS share, but permission denied when browsing
- Re: Client mounts NFS share, but permission denied when browsing
- Re: Client mounts NFS share, but permission denied when browsing
- Re: Client mounts NFS share, but permission denied when browsing
- NFS mount fails, permission denied, no export entry
- NFS permission denied
- configuration nfs server
- configuration nfs client
- 2 Answers 2
- example
- services running on nfs clients
- rpcinfo
- mounting and the kernel modules
Монтирование nfs шары — failed: Permission denied
В подсети 1 есть nas, c nfs шарами
На 192.168.2.1 (в подсети 2) пробую примонтировать
Потому-что нет прав? Тебе же русским языком написали (:
Тащемта, это наркомания, когда из домашней сети пытаются делать каких-то осьминогов с подсетями 1 и 2. Задавая подсеть /24 надо быть готовым использовать только одну 192.168.х.
Опа, не дописал. Первая подсеть можеть ходить на шару с музыкой, а не целиком на шару.
Это действительно наркомания, когда твои глаза не верят написанному.
Тут, похоже, что-то другое. Поменял на
Если подключаю с неправильным именем — получаю
Мля, да смотри куда монтируешь-то, не надо это делать из под рута, в хомяк религия не позволяет?
А последнее уже по делу, карту сети давай
Это микророутер с 8Мб, там кроме рута никого нет и не будет.
Задача такова: есть основная сеть (192.168.1.*), в ней нормальный роутер, нас. В один из портов подключаю микророутер, чтобы добивать туда, где стены не дают. Это вторая сеть 192.168.2.*
Зачем нужно мапить шары на роутере? Потому что dlna не работет между сетями, а если поднять на роутере minidlna, и натравить на шару, то, возможно, взлетит.
Добавить маршрут или втащить всех в одну подсеть. Последнее наверное правильней или у тебя истерия со слежкой?
И зы, dlna по вафле убого, кинь шнур.
А как затащить клиентов микророутера в 192.168.1.*?
Телевизор подключен по шнурку, в основной сети. А для смарта/планшета хватит.
Оно не настраиваемое?, очевидно что оставить в подсети 192,168,1,*
Источник
Permission Denied with mounting NFS with Webmin (Mac OSX + Ubuntu Setup)
The Goal
I have the following setup —
- Home Server running Ubuntu 13.10
- Laptop running Mac OSX 10.9 (Mavericks)
I’m trying to export the Home Server directory
/Documents as an NFS mount that can be accessed from my mac laptop
Ubuntu Setup
I used Webmin on Ubuntu to create an NFS Export. In the interest of just testing access for the moment I allowed any hostname to connect with read/write access.
Webmin created the following configuration under /etc/exports
Mac OX 10.9 Laptop Setup
I mounted the remote directory to a local directory, /private/nfs
All worked fine, and I can see «Dcouments» mounted under /private in Finder.
However, I can’t get into that directory
I had webmin set permissions as read/write ( rw ) and it’s not filtering on any IP’s or hostnames, so what else is required to access that directory?
Thanks in advance for all your help!
Edit:
Here’s my Webmin setup.
Webmin wont let me select an NFS version of 4, presumably because I only have NFS v3 installed, as per nfsstat
1 Answer 1
You’re likely running into an issue with numeric user id’s: the numeric user id on your ubuntu system does not match the numeric user id on your Mac. With NFS, you generally have to insure that your numeric user ids are somehow made the same across all of your systems. On home/personal systems, user ids tend to assigned haphazardly, without any sort of synchronization, which causes problems with NFS.
Since this is a home server, and if you trust everyone that connects to your NFS server, one possible quick-and-easy-and-dirty-and-ugly-and-kludgy fix is to open up permissions and allow everyone and everything to read/write/delete your files (do not do this in an enterprise environment, obviously):
On your Ubuntu system, login as jeeves (do not sudo or use any other account), open a terminal window, and run the commands, in the given order:
However, this assumes that NFS is set up to allow access to untrusted users (in webmin, «Treat untrusted users as» is set to default, and I’m not sure what this is).
Note that, with the above commands, the owners of files and directories created by the Mac will appear as numeric users on Ubuntu (because the Ubuntu system will likely not have any users in /etc/passwd corresponding to the Mac numeric ids, Ubuntu will simply display the raw numeric ids).
Long answer:
When you created the jeeves account on your Ubuntu system, Ubuntu assigned it some numeric user id. When you created your user account on your Mac, the Mac assigned it a numeric user id, which was likely different than the number assigned on the Ubuntu system. Note that user names (e.g., «jeeves») are a user convenience; neither Ubuntu nor the Mac use them internally, and instead use user ids. NFS uses these numeric ids to determine ownership/permissions (on the Ubuntu box).
If the ids match, the «user» permissions are used.
If the ids don’t match:
(«Group» permissions can be used, but that’s unlikely, and I’m not going to discuss that.)
The «Other» permissions are used. Note that, when creating files/directories, if the (Mac) user id isn’t found in the Ubuntu box, you’ll generally get files that appear to be owned by a «numeric» owner; the number you see is what the Mac is using, and you see the number because that id doesn’t appear in Ubuntu’s /etc/passwd .
IIRC, Ubuntu uses a umask of 022, which means that only the owner of /home/jeeves/Documents can write/create files and directories; everyone else has read-only permissions. Unless you’ve somehow synchronized user ids between your boxes, you’re unlikely to have the same user ids, and so you will get permission issues.
Since this is a home server, the easiest fix, mentioned above, is to just get rid of security and allow everyone and everything to access your files. Of course, this is distasteful for obvious reasons.
The correct fix is to make sure that all user ids are synchronized between all systems, but this can be a problem in a home environment. Also, changing user ids once an account has been used is problematic; while this can be done, it has to be done carefully, as you might bork your system. I’m not going to go into details.
Источник
Thread: Client mounts NFS share, but permission denied when browsing
Thread Tools
Display
Client mounts NFS share, but permission denied when browsing
The server is my laptop, with a fresh install of Xubuntu 14.04.1 right after it was released. Its IP address is 192.168.0.126, assigned by the router via its MAC address. The client is my desktop, Xubuntu 12.04, up to date. Its IP address is 192.168.0.146, similarly assigned by the router.
There are two lines in /etc/exports on the server:
Note that one is currently commented out. I have tried one, then the other, then both, but I get the same results, i.e., the client can mount the share, but when attempting to view the files with Thunar I get «permission denied.» From the command line the cd command just hangs. Interestingly, switching to root with sudo su I still cannot view the files. If I launch Thunar as root I still get «permission denied.»
The mount command that I use to mount the share is:
The showmount command on the client gives me:
I think the fact that root on the client also cannot view the files is a big clue. Unfortunately, I can’t figure out what it means. I need some suggestions.
Re: Client mounts NFS share, but permission denied when browsing
First, you need to make sure that users on the clients have the same UID and GID as they do on the server.
Next, if you are mounting a share like /home, you’ll want to use no_root_squash on the server and mount the share on the client as root. Then permissions will be controlled by UID/GID. On small networks like the one in my house, I just copy the user accounts from the server’s /etc/passwd and /etc/group to the client after installation. Usually these are the ones starting at UID=1000.
If you use root_squash, then root’s account is mapped to «nobody» and usually has few permissions to read or write anything. Read «man exports» on the server for full details.
Last edited by SeijiSensei; September 7th, 2014 at 02:47 PM .
If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.
Re: Client mounts NFS share, but permission denied when browsing
First, you need to make sure that users on the clients have the same UID and GID as they do on the server.
Next, if you are mounting a share like /home, you’ll want to use no_root_squash on the server and mount the share on the client as root. Then permissions will be controlled by UID/GID. On small networks like the one in my house, I just copy the user accounts from the server’s /etc/passwd and /etc/group to the client after installation. Usually these are the ones starting at UID=1000.
If you use root_squash, then root’s account is mapped to «nobody» and usually has few permissions to read or write anything. Read «man exports» on the server for full details.
First, I should have mentioned at the beginning that I am the only user on both computers, and my username and password are the same. I did «cat/etc/passwd» and discovered that my UID and GID are identical on both machines. So are the UID and GID of root.
Next, I edited the exports line to say «no_root_squash» instead of just «root_squash,» but it didn’t make any difference. Then I read man exports and decided to try «all_squash,» which gave me another clue, alrhough it still didn’t work. The clue is that the folder on the server that I want to access is /media/jjj/Movies. With either root_squash or no_root_squash the client can see /media/jjj, but is denied access to Movies (an external drie). With all_squash the client can’t even see /media/jjj.
I have a feeling you’re on the right track that it is a UID/GID issue. It’s just that I know next to nothing about permissions.
Re: Client mounts NFS share, but permission denied when browsing
It has been two weeks since my previous post and I still have no solution. Yesterday I took the laptop (server) and the desktop (client) to a local Linux user group meeting and one of the gurus there spent the better part of an hour trying to figure out what was wrong with the permissions, but still no success. He spent most of the time trying to find a log with a message, but couldn’t find anything.
I can add to the facts already stated the results from the «id jjj» command on both machines:
On the server:
uid=1000(jjj) gid=1000(jjj) groups=1000(jjj),4(adm),24(cdrom),27(sudo),30(dip) ,46(plugdev),108(lpadmin),124(sambashare)
On the client:
uid=1000(jjj) gid=1000 (jjj)groups=1000(jjj),4(adm),24(cdrom),24(floppy), 27(sudo),29(audio),30(dip),44(video),46(plugdev),1 05(fuse),108(scanner),110(lpadmin),114(netadmin),1 23(sambashare),126(mythtv)
Источник
NFS mount fails, permission denied, no export entry
I have a problem mounting a NFS share that I can’t solve that is driving me nuts. This is the situation:
Three machines involved:
Host A: mandrake, IP 192.168.1.4, NFS server
Host B: athlon64, IP 192.168.1.64, NFS client
Host C: lap-fzs-2, IP 192.168.1.27, NFS client
Host A has an NFS server running which exports a directory that gets mounted by host B. This works flawless and has been working since ages. No problemo. Now host C comes into the picture. Ubuntu 12.04 LTS, modern system. I tried to mount the same share from host A but get a permission denied error:
The fact that it works between hosts A and B should be prove that the NFS export per se is working. Here is the info I can give that makes me think it should work. Maybe someone sees what I don’t and knows why this fails on the new host C.
The portmapper is running, the exports are known and mounted by host B «athlon64».
When the athlon64 host mounts the NFS share, the server log shows success:
But when the host C tries to mount the same share, the server log shows:
Host C sees the server, reaches the portmapper and the nfsd, but fail at the permissions.
I have to use NFSv2 on the client. Using NFSv4 will fail as the server doesn’t support it. It fails as it tries to connect via TCP directly to 2049 but the port isn’t open. No fallback happens. Using NFSv3 will result in a RPC program/version mismatch.
What am I missing?
Update:
All three machines are on one LAN, on the same switch. There is no firewall active on host C:
Источник
NFS permission denied
When I configure NFS and create a file on the client NFS shared dir, I get the following message: permission denied.
configuration nfs server
configuration nfs client
where is the problem?
2 Answers 2
You need to run the command on the server after modifying the /etc/exports file:
Also when debugging connectivity issues with NFS you can run the command showmount -e to see what mounts a given server is exporting out.
example
services running on nfs clients
You need to make sure that you have the following services running so that the clients can communicate with the NFS server:
As well as this one:
rpcinfo
With the above services running you should be able to check that the client can make remote procedure calls (rpc) to the NFS server like so:
mounting and the kernel modules
I see what you wrote in an answer that you then deleted. You should’ve added that info to the question!
I can see where you were getting stumped now. I don’t believe you’re suppose to be mounting using:
Try changing that. Also I see where you were ultimately getting stumped. You didn’t have the nfs kernel module loaded.
What I found is that with Ubuntu 15.04 updated thru the end of April. External USB drives can only be shared via NFS if the drive is mounted to the users home directory, and NOT THE DEFAULT Music/Video folders. Then nobody:nogroup on the server. The fsid=0 for the root of the export must there too. It all works. I can provide samples from the first client, then server.
I will post the server section as a separate answer as I do not have access YET to the root directory
Источник