Sponsored Content
Operating Systems Linux Red Hat Can't chgrp. Error - chgrp: changing group of `<file>': Invalid argument Post 302793895 by venmx on Sunday 14th of April 2013 11:07:41 AM
Old 04-14-2013
Can't chgrp. Error - chgrp: changing group of `<file>': Invalid argument

I found that I cannot chgrp for some reason with error:

chgrp: changing group of `<file>': Invalid argument

This happens on all NFS mounted disks on client machines.

We use AD (not my call) for authentication and it also provides groups.

We have a NFS server running Scientific Linux 6.3 which mounts SAN devices on FC connect. These are then exported via NFS. Clients are all CentOS 6.4.

The clients hard mounts the user's home disk with intr,sync and various tuning options. The other disks use autofs.

AD is configured so that each user has a matching UID and GID, essentially making them the exclusive member of their own group. Not useful for sharing files unless you don't mind making all your files accessibly by world, o+.

We need groups so that we can add members who are then able to chgrp what ever files they'd like to share with members of the same group. All seems pretty straight forward so far.

I used to run OpenLDAP with Kerberos to do all this, I had LDAP manage autofs and groups. Everything worked perfectly.

But now I cannot chgrp.

The permissions of the exported directories on the NFS server are:
drwx--x--x root root /san/home
drwxrwxrwx root root /san/otherdisks

But under home each user directory is owned by the user:
drwx--x--x user1 user1 /san/home/user1

NOTE: "other" means machines within same organization using same AD but built by other departments, "this" means the machines I built.

In the following scenarios it fails:

1. As AD user on "this" client machine on own home on "this" NFS server.
2. As AD user on "this" client machine on automounted disk on "this" NFS server.
3. As root on "this" client machine on automounted disk on "this" NFS server.

In the following scenarios it works:

1. As AD user on "this" client on local partitions where permissions allow.
2. As AD user logged in directly on "this" NFS server on any partition where permissions allow, including on SAN disks.
3. As root on "this" file server on any partition.
4. As AD user on "other" clients on export from "this" NFS server.
5. As AD user on "other" clients on export from "other" NFS server.
6. As AD user on "this" client on export from "other" NFS server.

This issue shows itself when I extract TAR files whilst on client machines to NFS exported shares as AD user or root, can't chgrp!

I can do everything else, I can create, delete, even do newgrp and change my default group then create new files belonging to me with GID of new group. But still can't chgrp to any other group I am a member of when on "this" client and "this" NFS server's export.

To me problem looks like it's on the client side, but I cannot find the issue. Checked all directory permissions of shares on server, tried mounting on other clients, tried other client/server on same AD.

I hope I'm concise and simple enough to go by. Please help! =)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stty: : Invalid argument

Hello Everyone; I have a script that is throwing the following message: stty: : Invalid argument The line that gives the message is the following, sailormoon$ scp home/voice.xml newwave@silvermoon:/newwave/config/radius stty: : Invalid argument voice.xml | ... (2 Replies)
Discussion started by: tony3101
2 Replies

2. Programming

error "Invalid argument" returned after call sched_setscheduler

the code is below and the was run on Solaris 9. ----------------------------- struct sched_param param; param.sched_priority = 99; if(sched_setscheduler(0, SCHED_RR, &param) == -1) { perror("setting priority"); exit(1); } ------------------------------- after the... (1 Reply)
Discussion started by: robin.zhu
1 Replies

3. Solaris

Owner of file gets 'not owner' error for chgrp

Hi Folks, I know that changing users and groups is pretty basic admin, but this one has got me stumped. When I try to change the group of a file for which I am the owner for, it still gives me a 'Not owner' error. For example, when I am logged in as 'webadmin', I have the following file: ... (4 Replies)
Discussion started by: brizrobbo
4 Replies

4. UNIX for Dummies Questions & Answers

msgrcv : Invalid argument

Hi All, Please guide me how to get rid : msgrcv : Invalid argument. I am using message queues: msgsnd and msgrcv, I am able to send through msgsnd and receive through msgrcv, but at times i get the belo error. msgrcv : Invalid argument. (1 Reply)
Discussion started by: answers
1 Replies

5. UNIX for Dummies Questions & Answers

Chgrp and Chown ???

Hi Can anybody please let me know the usage of Chgrp command with an example??? Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

6. OS X (Apple)

AFP mount + Chown/Chgrp respecting

Hello all... Does anyone know how to make an AFP mount of home directories (/Volumes/users off of another server) so that any users doing an ssh login retain write permission to their individual folders, read-write permissions to folders chowned to appropriate group... and so that newly created... (0 Replies)
Discussion started by: drkdev
0 Replies

7. Shell Programming and Scripting

Can't chgrp, chown on Linux

I have a problem on Linux wherein it doesn't allow me to use the chown and chgrp even if I am the owner of the file. Is this one of the Linux limitations? BTW, I can use chmod. (4 Replies)
Discussion started by: Jin_
4 Replies

8. Shell Programming and Scripting

Perl "Invalid argument error"

Hi , we have a issue in server, we are running a perl script to connect our clients, but we are not able to connect, every time we are getting the "Invalid argument error" Even i checked all the necessary perl modules are i installed in this server, #create the listen socket my... (2 Replies)
Discussion started by: anishkumarv
2 Replies

9. Solaris

Chgrp failed on NAS mounted

Hi, I am facing chgrp issue for a directory on a NAS mounted partation. issue details : user1 belongs to two groups grp1(primary) and grp2(secondary) not able to change directory group to secondary. WORKING on /tmp #mkdir /tmp/a #ls -ld /tmp/a drwxr-xr-x 2 user1 grp1 117 Mar 24... (7 Replies)
Discussion started by: naveen.surisett
7 Replies

10. UNIX for Beginners Questions & Answers

Mount error in Linux: invalid argument

hi i have an android phone which i think is bricked, so wanted to see what the actual issue is, I flashed it with TWRP recovery image and launched terminal i, was able understand that mount is not happening, it says invalid argument and no such file or directory. Below is what i get while... (32 Replies)
Discussion started by: nanz143
32 Replies
nfssec(5)																 nfssec(5)

NAME
nfssec - overview of NFS security modes The mount_nfs(1M) and share_nfs(1M) commands each provide a way to specify the security mode to be used on an NFS file system through the sec=mode option. mode can be sys, dh, krb5, krb5i, krb5p, or none. These security modes can also be added to the automount maps. Note that mount_nfs(1M) and automount(1M) do not support sec=none at this time. mount_nfs(1M) allows you to specify a single security mode; share_nfs(1M) allows you to specify multiple modes (or none). With multiple modes, an NFS client can choose any of the modes in the list. The sec=mode option on the share_nfs(1M) command line establishes the security mode of NFS servers. If the NFS connection uses the NFS Ver- sion 3 protocol, the NFS clients must query the server for the appropriate mode to use. If the NFS connection uses the NFS Version 2 proto- col, then the NFS client uses the default security mode, which is currently sys. NFS clients may force the use of a specific security mode by specifying the sec=mode option on the command line. However, if the file system on the server is not shared with that security mode, the client may be denied access. If the NFS client wants to authenticate the NFS server using a particular (stronger) security mode, the client wants to specify the secu- rity mode to be used, even if the connection uses the NFS Version 3 protocol. This guarantees that an attacker masquerading as the server does not compromise the client. The NFS security modes are described below. Of these, the krb5, krb5i, krb5p modes use the Kerberos V5 protocol for authenticating and pro- tecting the shared filesystems. Before these can be used, the system must be configured to be part of a Kerberos realm. See SEAM(5). sys Use AUTH_SYS authentication. The user's UNIX user-id and group-ids are passed in the clear on the network, unauthenticated by the NFS server. This is the simplest security method and requires no additional administration. It is the default used by Solaris NFS Version 2 clients and Solaris NFS servers. dh Use a Diffie-Hellman public key system (AUTH_DES, which is referred to as AUTH_DH in the forthcoming Internet RFC). krb5 Use Kerberos V5 protocol to authenticate users before granting access to the shared filesystem. krb5i Use Kerberos V5 authentication with integrity checking (checksums) to verify that the data has not been tampered with. krb5p User Kerberos V5 authentication, integrity checksums, and privacy protection (encryption) on the shared filesystem. This provides the most secure filesystem sharing, as all traffic is encrypted. It should be noted that performance might suffer on some systems when using krb5p, depending on the computational intensity of the encryption algorithm and the amount of data being transferred. none Use null authentication (AUTH_NONE). NFS clients using AUTH_NONE have no identity and are mapped to the anonymous user nobody by NFS servers. A client using a security mode other than the one with which a Solaris NFS server shares the file system has its security mode mapped to AUTH_NONE. In this case, if the file system is shared with sec=none, users from the client are mapped to the anonymous user. The NFS security mode none is supported by share_nfs(1M), but not by mount_nfs(1M) or automount(1M). /etc/nfssec.conf NFS security service configuration file See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWnfscr | +-----------------------------+-----------------------------+ automount(1M), mount_nfs(1M), share_nfs(1M), rpc_clnt_auth(3NSL), secure_rpc(3NSL), nfssec.conf(4), attributes(5) /etc/nfssec.conf lists the NFS security services. Do not edit this file. It is not intended to be user-configurable. 13 Apr 2005 nfssec(5)
All times are GMT -4. The time now is 04:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy