LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-15-2015, 06:58 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
Does NFS support ACLs?


Does NFS support ACLs? I've put the following in my /etc/exports file:

/redirectedFolders/Users/mark 192.168.0.0/24(rw,acl)

and it didn't complain. And I put the following in my /etc/auto.misc file on the client:

Desktop -fstype=nfs,nfsvers=3,acl,rw mail:/redirectedFolders/Users/mark/Desktop

and it didn't complain either, but when I examine the files so mounted there are no '+' signs at the end of the permissions, so it must not be that simple.

Does anyone have any insight?
 
Old 10-15-2015, 08:51 PM   #2
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
NFSv4 does, but I'm not sure about 3 (your "nfsvers=3")
 
Old 10-16-2015, 09:52 AM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
It appears that my server-side nfsd does support version 4. Do you know how I set that? If I have

mail:/redirectedFolders/Users/mark /home/HPRS/mark nfs noauto,nfsvers=4,rw,acl 0 0

in my /etc/fstab on the client, I get the following error when I try to mount:

$ mount /home/HPRS/mark
mount.nfs: access denied by server while mounting mail:/redirectedFolders/Users/mark

If I change back the "nfsver=3" it mounts OK.
 
Old 10-16-2015, 09:57 AM   #4
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
There are some additional ports that have to be open for v4 (2049), and both server and client have to support NFSv4 (most do, but sometimes..)

https://www.centos.org/docs/5/html/D...US/ch-nfs.html
 
Old 10-16-2015, 10:02 AM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
A bit of web searching turns up this about the nsfver= option: "If no version is specified, NFS uses the highest supported version by the kernel and mount command. This option is not supported with NFSv4 and should not be used."

So, I tried removing the option altogether, but got the same "access denied" message.

I also tried

mount -t nfs4 mail:/redirectedFolders/Users/mark /home/HPRS/mark

same error.

Any ideas on why?
 
Old 10-16-2015, 10:08 AM   #6
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Ah ah! I added no_root_squash to the server /etc/exports:

/redirectedFolders/Users/mark 192.168.0.0/24(rw,no_root_squash,acl)

and it mounted!!

mount -t nfs4 mail:/redirectedFolders/Users/mark /home/HPRS/mark

Still not showing the ACLs that exist on the server files.

Last edited by mfoley; 10-16-2015 at 10:10 AM.
 
Old 10-17-2015, 04:27 AM   #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
Are you sure? The + only shows if there are ACLs added to a file. Normally, mail directories are owned by the user, with group mail access for the mail transfer agent to write to them. Files with no added ACL get a "." instead.
 
Old 10-18-2015, 03:03 PM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Here ls the `ls -l` of the several files in a folder on the NFS host:

Code:
$ ls -l
-rw-r--r--+ 1 mark    domusers         78 2015-10-16 17:38 phoneMessages
-rw-r--r--+ 1 mark    domusers       9216 2015-10-16 17:10 SURnoMember.xls
-rwxrwx---+ 1 3000026 domusers         27 2015-10-11 22:49 whatGIDUID.txt*
Notice the '+' sign.

Here is the `ls -l` of that same folder mounted on the client workstation. Notice no '+' signs:

Code:
$ ls -l
-rw-r--r-- 1 mark    domain users         78 Oct 16 17:38 phoneMessages
-rw-r--r-- 1 mark    domain users       9216 Oct 16 17:10 SURnoMember.xls
-rwxrwx--- 1 3000026 domain users         27 Oct 11 22:49 whatGIDUID.txt
Here is a `getfacl` for the file phoneMessages on the NFS host (where the file actually lives):

Code:
$ getfacl phoneMessages
# file: phoneMessages
# owner: mark
# group: domusers
user::rw-
user:3000002:rwx                #effective:r--
user:3000003:rwx                #effective:r--
user:3000008:rwx                #effective:r--
user:3000026:rwx                #effective:r--
group::---
group:users:---
group:3000002:rwx               #effective:r--
group:3000003:rwx               #effective:r--
group:3000008:rwx               #effective:r--
mask::r--
other::r--
Here is the `getfacl` on the same file on the NFS client workstation:

Code:
$ getfacl phoneMessages
# file: phoneMessages
# owner: mark
# group: domain\040users
user::rw-
group::r--
other::r--
Notice they are not the same. I do believe I have nfs4 enabled on both my server and client.

Now, here is the error I get on the client when I try to setfacl:

Code:
$ setfacl -m user:10001:rwx phoneMessages
setfacl: phoneMessages: Operation not supported
So, as it stands, I am not getting the acl's from the server, nor can I set them on the client workstation.

Ideas?
 
Old 10-18-2015, 05:50 PM   #9
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
Do you have the utility nfs4_getfacl?
The package name should be "nfs4-acl-tools".

It appears that NFSv4 doesn't use the same ACLs as most of Linux filesystems: http://wiki.linux-nfs.org/wiki/index.php/ACLs
so they don't show up in the usual way (I didn't that - sorry).

It also appears that NFSv3 should support ACLs too: https://access.redhat.com/documentat...e/ch-acls.html, but it depends on both server and client having ACLS, and the NFS server has to support it for NFS.

I'll keep looking.
 
Old 10-19-2015, 12:59 PM   #10
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by jpollard View Post
It appears that NFSv4 doesn't use the same ACLs as most of Linux filesystems: http://wiki.linux-nfs.org/wiki/index.php/ACLs so they don't show up in the usual way ...
Hmmm, that link you gave has the following:

"The NFSv4 protocol includes integrated support for ACLs which are similar to those used by Windows. NFSv4 ACLs are richer than POSIX draft ACLs--any POSIX ACL can be represented by an NFSv4 ACL with almost the same semantics ..."

The ACLs on my server were, in fact, created by Windows, so one would think this would work nicely with NFS4.

Quote:
Do you have the utility nfs4_getfacl? The package name should be "nfs4-acl-tools".
No, but I'll check it out.
 
  


Reply

Tags
acl, nfs



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
Linux NFS client <--> Leopard NFS server ACL support tplessers Linux - Networking 0 02-17-2010 04:28 AM
NFS, ACLs, and "kernel: svc: unknown version" stowler Linux - Server 1 04-11-2008 05:17 PM
Acls over nfs problem spAlex Linux - Server 2 07-02-2007 02:01 AM
ACLs through NFS in Fedora Core 3 grimpy Linux - Networking 1 11-10-2005 12:41 AM
RH 9 NFS Kernel Support? drumltd Linux - Networking 0 10-10-2003 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:57 AM.

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