Effective process GID is ignored when client creates file on NFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have met application that is badly broken when installed on NFS. The
reason is - it expects files to belong to specific group. It switches
to this group on startup (explicit setgid) and creates files. But
files come out as belonging to GID 0.

I finally reduced it to this trivial script:

=== cut here ===
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

main()
{
        int fd;

        setgid(107);
        fd = open("bar", O_CREAT, 0666);
        close(fd);
}
=== cut here ===

On local storage file comes with GID 107; on NFS file comes with GID 0.

Linux is SLES10 SP3 with relatively old kernel: 2.6.16.60-0.89.1-smp,
server(s) are NetApp with different Data ONTAP versions (7.x and 8.1.1
as the last).

Client passes correct credentials (UID:0, GID:107), but does not
explicitly request file ownership in CREATE call (uid set_it - 0, gid
set_it - 0).

I am not sure whether this is a bug and if yes, on which side. I
appreciate any hint. Thank you!

-andrey
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux