NFSv3-Client creates empty files on AIX 5.1/5.3 file server
Subsystems (2)
Hi,
we have some trouble with NFSv3 clients editing files exported by an aix file server:
If a user wants to edit a file which he doesn't own but belongs to the group he's in with vim, he gets after trying to write (:w) the error message:
E212: Can't open file for writing
and after trying to quit this process without writing (:q!) this file is empty (0 bytes)!
If the user edits the file and quits the vim with ":wq!" the file is okay but belongs now to the new user.
This happens on open SUSE 10.2 workstations (2.6.18.8-0.1-default x86_64) and AIX 5.1/5.3 file servers.
To debug this problem I wrote a small c programm (sctestfile02 is the file which is located in a directory mounted per nfs on the client):
#include <stdio.h>
#include <fcntl.h>
int main (void)
{
int fd;
fd = open ("sctestfile02", O_WRONLY|O_CREAT|O_TRUNC, 0660); close (fd);
return 0;
}
and after compiling I tried to "trace" it on the suse 10.2 client:
Quoted 1 line
strace ./justopen
execve("./justopen", ["./justopen"], [/* 68 vars */]) = 0
brk(0) = 0x501000mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae40ef67000uname({sys="Linux", node="wu0c0135", ...}) = 0access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)open("/etc/ld.so.cache", O_RDONLY) = 3fstat(3, {st_mode=S_IFREG|0644, st_size=179794, ...}) = 0 mmap(NULL, 179794, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ae40ef68000
close(3) = 0open("/lib64/libc.so.6", O_RDONLY) = 3read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\333"..., 832) = 832fstat(3, {st_mode=S_IFREG|0755, st_size=1595305, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae40ef94000mmap(NULL, 3412216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ae40f169000fadvise64(3, 0, 3412216, POSIX_FADV_WILLNEED) = 0 mprotect(0x2ae40f2a2000, 2093056, PROT_NONE) = 0 mmap(0x2ae40f4a1000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138000) = 0x2ae40f4a1000 mmap(0x2ae40f4a6000, 16632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ae40f4a6000
close(3) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae40f4ab000arch_prctl(ARCH_SET_FS, 0x2ae40f4ab6f0) = 0 mprotect(0x2ae40f4a1000, 12288, PROT_READ) = 0munmap(0x2ae40ef68000, 179794) = 0open("sctestfile02", O_WRONLY|O_CREAT|O_TRUNC, 0660) = -1 EPERM (Operation not permitted)
close(4294967295) = -1 EBADF (Bad file descriptor)exit_group(0) = ?
Process 15970 detached
If I trace the same "program" on a SuSE 9.3 workstation (2.6.11.4-21.8-smp x86_64), everything seems to be fine:
Quoted 1 line
strace ./justopen
execve("./justopen", ["./justopen"], [/* 86 vars */]) = 0 uname({sys="Linux", node="wu0c0245", ...}) = 0
brk(0) = 0x501000mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac1000access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)open("/etc/ld.so.cache", O_RDONLY) = 3fstat(3, {st_mode=S_IFREG|0644, st_size=176481, ...}) = 0 mmap(NULL, 176481, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aaaaaac2000
close(3) = 0open("/lib64/tls/libc.so.6", O_RDONLY) = 3read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\305"..., 640) = 640lseek(3, 64, SEEK_SET) = 64read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616) = 616lseek(3, 680, SEEK_SET) = 680read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) = 32fstat(3, {st_mode=S_IFREG|0755, st_size=1446783, ...}) = 0lseek(3, 64, SEEK_SET) = 64read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616) = 616mmap(NULL, 2252744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaabc2000madvise(0x2aaaaabc2000, 2252744, MADV_SEQUENTIAL|0x1) = 0 mprotect(0x2aaaaacdf000, 1085384, PROT_NONE) = 0 mmap(0x2aaaaadde000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11c000) = 0x2aaaaadde000 mmap(0x2aaaaade4000, 16328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aaaaade4000
close(3) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaade8000mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaade9000mprotect(0x2aaaaadde000, 12288, PROT_READ) = 0 arch_prctl(ARCH_SET_FS, 0x2aaaaade8b00) = 0munmap(0x2aaaaaac2000, 176481) = 0open("sctestfile02", O_WRONLY|O_CREAT|O_TRUNC, 0660) = 3
close(3) = 0exit_group(0) = ?
In the next step I changed the /etc/amd.conf on the "buggy" workstation (suse 10.2), so it should use NFS v2:
# cat /etc/amd.conf # # ######################################################################## # # file /etc/amd.conf # ######################################################################## # # GLOBAL OPTIONS SECTION [ global ] # Log in /var/adm #log_options = all log_options = all,noinfo plock = yes selectors_on_default = yes print_version = yes nfs_vers = 2 nfs_proto = udp # #map_options = cache:=all # #browsable_dirs = yes #show_statfs_entries = yes log_file = /var/adm/amdlog
and restarted the automounter. Now I tried the same strace:
Quoted 1 line
strace ./justopen
execve("./justopen", ["./justopen"], [/* 68 vars */]) = 0
brk(0) = 0x501000mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b1ba404a000uname({sys="Linux", node="wu0c0135", ...}) = 0access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)open("/etc/ld.so.cache", O_RDONLY) = 3fstat(3, {st_mode=S_IFREG|0644, st_size=179794, ...}) = 0 mmap(NULL, 179794, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b1ba404b000
close(3) = 0open("/lib64/libc.so.6", O_RDONLY) = 3read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\333"..., 832) = 832fstat(3, {st_mode=S_IFREG|0755, st_size=1595305, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b1ba4077000mmap(NULL, 3412216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b1ba424c000fadvise64(3, 0, 3412216, POSIX_FADV_WILLNEED) = 0 mprotect(0x2b1ba4385000, 2093056, PROT_NONE) = 0 mmap(0x2b1ba4584000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138000) = 0x2b1ba4584000 mmap(0x2b1ba4589000, 16632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b1ba4589000
close(3) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b1ba458e000arch_prctl(ARCH_SET_FS, 0x2b1ba458e6f0) = 0 mprotect(0x2b1ba4584000, 12288, PROT_READ) = 0munmap(0x2b1ba404b000, 179794) = 0open("sctestfile02", O_WRONLY|O_CREAT|O_TRUNC, 0660) = 3
close(3) = 0exit_group(0) = ?
Process 16783 detached
So it seems to be okay now but we can't use NFSv2 because of file size limitations. BTW: If I let my little programm open the file on the nfs server without the option O_TRUNC everything is fine too (on suse 9.3 and 10.2).
After changing back to NFSv3 on this client, I tried to dump the network traffic and discovered an error while executing the small c programm. And the only difference between the SuSE 9.3 client and open SUSE 10.2 client dump is the last frame on the suse 10.2:
No. Time Source Destination Protocol
Info
424 2.812985 53.60.5.101 53.60.149.36 NFS V3
SETATTR Reply (Call In 423) Error:NFS3ERR_PERM
...
...
Network File System, SETATTR Reply Error:NFS3ERR_PERM [Program Version: 3]
[V3 Procedure: SETATTR (2)]
Status: NFS3ERR_PERM (1)
obj_wcc
before
attributes_follow: value follows (1)
attributes
size: 0
mtime: Mar 27, 2007 12:57:37.872617455
seconds: 1174993057
nano seconds: 872617455
ctime: Mar 27, 2007 12:57:37.872617455
seconds: 1174993057
nano seconds: 872617455
after Regular File mode:0660 uid:50124 gid:50079
attributes_follow: value follows (1)
attributes Regular File mode:0660 uid:50124 gid:50079
Type: Regular File (1)
mode: 0500660
0... .... .... = not SUID
.0.. .... .... = not SGID
..0. .... .... = not save swapped text
...1 .... .... = Read permission for owner
.... 1... .... = Write permission for owner
.... .0.. .... = no Execute permission for owner
.... ..1. .... = Read permission for group
.... ...1 .... = Write permission for group
.... .... 0... = no Execute permission for group
.... .... .0.. = no Read permission for others
.... .... ..0. = no Write permission for others
.... .... ...0 = no Execute permission for others
nlink: 1
uid: 50124
gid: 50079
size: 0
used: 0
rdev: 0,0
specdata1: 0
specdata2: 0
fsid: 0x8000006400000007
fileid: 25650
atime: Mar 26, 2007 18:29:42.000000000
seconds: 1174926582
nano seconds: 0
mtime: Mar 27, 2007 12:57:37.872617455
seconds: 1174993057
nano seconds: 872617455
ctime: Mar 27, 2007 12:57:37.872617455
seconds: 1174993057
nano seconds: 872617455A little bit of searching the internet explained this error and tells me that the "caller doesn't have the correct ownership to perform the requested operation", but the user is in the same _group_ as the owner and the file has reading and writing permissions for owner and group.
Is there anything I could do to prevent the "creation of zero byte files" or to get more information for debugging purpose?
Greetings
Toni
Signature · 13 lines
Toni Zimmer science + computing ag IT Services Hagellocher Weg 73 phone +49 7071 9457 485 72070 Tuebingen, Germany fax +49 7071 9457 411 www.science-computing.de ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 264 lines · Toni Zimmer
Hi,
we have some trouble with NFSv3 clients editing files exported by an aix file server:
If a user wants to edit a file which he doesn't own but belongs to the group he's in with vim, he gets after trying to write (:w) the error message:
E212: Can't open file for writingand after trying to quit this process without writing (:q!) this file is empty (0 bytes)!
If the user edits the file and quits the vim with ":wq!" the file is okay but belongs now to the new user.
This happens on open SUSE 10.2 workstations (2.6.18.8-0.1-default
x86_64) and AIX 5.1/5.3 file servers.To debug this problem I wrote a small c programm (sctestfile02 is the file which is located in a directory mounted per nfs on the client):
#include <
stdio.h>
#include <fcntl.h>int main (void)
{
int fd;
fd = open ("sctestfile02", O_WRONLY|O_CREAT|O_TRUNC, 0660); close (fd);
return 0;
}and after compiling I tried to "trace" it on the suse 10.2 client:
Quoted 1 line
strace ./justopen
execve("./justopen", ["./justopen"], [/* 68 vars */])= 0
brk(0) =0x501000mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2ae40ef67000uname({sys="Linux", node="wu0c0135", ...})= 0access("/etc/ld.so.preload", R_OK)= -1 ENOENT (No such file or
directory)open("/etc/ld.so.cache", O_RDONLY)= 3fstat(3, {st_mode=S_IFREG|0644, st_size=179794, ...})= 0mmap(NULL, 179794, PROT_READ, MAP_PRIVATE, 3, 0)=0x2ae40ef68000
close(3) = 0open("/lib64/libc.so.6", O_RDONLY)= 3read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\333"..., 832)= 832fstat(3, {st_mode=S_IFREG|0755, st_size=1595305, ...})= 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2ae40ef94000mmap(NULL, 3412216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)=0x2ae40f169000fadvise64(3, 0, 3412216, POSIX_FADV_WILLNEED)= 0mprotect(0x2ae40f2a2000, 2093056, PROT_NONE)= 0mmap(0x2ae40f4a1000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138000)=0x2ae40f4a1000mmap(0x2ae40f4a6000, 16632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)=0x2ae40f4a6000
close(3) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2ae40f4ab000arch_prctl(ARCH_SET_FS, 0x2ae40f4ab6f0)= 0mprotect(0x2ae40f4a1000, 12288, PROT_READ)= 0munmap(0x2ae40ef68000, 179794)= 0open("sctestfile02", O_WRONLY|O_CREAT|O_TRUNC, 0660)= -1 EPERM (Operation not permitted)
close(4294967295) = -1 EBADF (Bad file descriptor)exit_group(0)= ?
Process 15970 detachedIf I trace the same "program" on a SuSE 9.3 workstation (2.6.11.4-21.8-smp
x86_64), everything seems to be fine:Quoted 1 line
strace ./justopen
execve("./justopen", ["./justopen"], [/* 86 vars */])= 0uname({sys="Linux", node="wu0c0245", ...})= 0
brk(0) =0x501000mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2aaaaaac1000access("/etc/ld.so.preload", R_OK)= -1 ENOENT (No such file or
directory)open("/etc/ld.so.cache", O_RDONLY)= 3fstat(3, {st_mode=S_IFREG|0644, st_size=176481, ...})= 0mmap(NULL, 176481, PROT_READ, MAP_PRIVATE, 3, 0)=0x2aaaaaac2000
close(3) = 0open("/lib64/tls/libc.so.6", O_RDONLY)= 3read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\305"..., 640)= 640lseek(3, 64, SEEK_SET)= 64read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616)= 616lseek(3, 680, SEEK_SET)= 680read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32)= 32fstat(3, {st_mode=S_IFREG|0755, st_size=1446783, ...})= 0lseek(3, 64, SEEK_SET)= 64read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616)= 616mmap(NULL, 2252744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)=0x2aaaaabc2000madvise(0x2aaaaabc2000, 2252744, MADV_SEQUENTIAL|0x1)= 0mprotect(0x2aaaaacdf000, 1085384, PROT_NONE)= 0mmap(0x2aaaaadde000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11c000)=0x2aaaaadde000mmap(0x2aaaaade4000, 16328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)=0x2aaaaade4000
close(3) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2aaaaade8000mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2aaaaade9000mprotect(0x2aaaaadde000, 12288, PROT_READ)= 0arch_prctl(ARCH_SET_FS, 0x2aaaaade8b00)= 0munmap(0x2aaaaaac2000, 176481)= 0open("sctestfile02", O_WRONLY|O_CREAT|O_TRUNC, 0660)= 3
close(3) = 0exit_group(0)= ?In the next step I changed the
/etc/amd.confon the "buggy" workstation (suse 10.2), so it should use NFS v2:# cat /etc/amd.conf # # ######################################################################## # # file /etc/amd.conf # ######################################################################## # # GLOBAL OPTIONS SECTION [ global ] # Log in /var/adm #log_options = all log_options = all,noinfo plock = yes selectors_on_default = yes print_version = yes nfs_vers = 2 nfs_proto = udp # #map_options = cache:=all # #browsable_dirs = yes #show_statfs_entries = yes log_file = /var/adm/amdlogand restarted the automounter. Now I tried the same strace:
Quoted 1 line
strace ./justopen
execve("./justopen", ["./justopen"], [/* 68 vars */])= 0
brk(0) =0x501000mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2b1ba404a000uname({sys="Linux", node="wu0c0135", ...})= 0access("/etc/ld.so.preload", R_OK)= -1 ENOENT (No such file or
directory)open("/etc/ld.so.cache", O_RDONLY)= 3fstat(3, {st_mode=S_IFREG|0644, st_size=179794, ...})= 0mmap(NULL, 179794, PROT_READ, MAP_PRIVATE, 3, 0)=0x2b1ba404b000
close(3) = 0open("/lib64/libc.so.6", O_RDONLY)= 3read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\333"..., 832)= 832fstat(3, {st_mode=S_IFREG|0755, st_size=1595305, ...})= 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2b1ba4077000mmap(NULL, 3412216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)=0x2b1ba424c000fadvise64(3, 0, 3412216, POSIX_FADV_WILLNEED)= 0mprotect(0x2b1ba4385000, 2093056, PROT_NONE)= 0mmap(0x2b1ba4584000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138000)=0x2b1ba4584000mmap(0x2b1ba4589000, 16632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)=0x2b1ba4589000
close(3) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x2b1ba458e000arch_prctl(ARCH_SET_FS, 0x2b1ba458e6f0)= 0mprotect(0x2b1ba4584000, 12288, PROT_READ)= 0munmap(0x2b1ba404b000, 179794)= 0open("sctestfile02", O_WRONLY|O_CREAT|O_TRUNC, 0660)= 3
close(3) = 0exit_group(0)= ?
Process 16783 detachedSo it seems to be okay now but we can't use NFSv2 because of file size limitations. BTW: If I let my little programm open the file on the nfs server without the option
O_TRUNCeverything is fine too (on suse 9.3 and 10.2).After changing back to NFSv3 on this client, I tried to dump the network traffic and discovered an error while executing the small c programm. And the only difference between the SuSE 9.3 client and open SUSE 10.2 client dump is the last frame on the suse 10.2:
No. Time Source Destination Protocol
Info
424 2.812985 53.60.5.101 53.60.149.36 NFS V3
SETATTR Reply (Call In 423) Error:NFS3ERR_PERM
...
...
Network File System, SETATTR Reply Error:NFS3ERR_PERM [Program Version: 3][V3 Procedure: SETATTR (2)] Status: NFS3ERR_PERM (1) obj_wcc before attributes_follow: value follows (1) attributes size: 0 mtime: Mar 27, 2007 12:57:37.872617455 seconds: 1174993057 nano seconds: 872617455 ctime: Mar 27, 2007 12:57:37.872617455 seconds: 1174993057 nano seconds: 872617455 after Regular File mode:0660 uid:50124 gid:50079 attributes_follow: value follows (1) attributes Regular File mode:0660 uid:50124 gid:50079 Type: Regular File (1) mode: 0500660 0... .... .... = not SUID .0.. .... .... = not SGID ..0. .... .... = not save swapped text ...1 .... .... = Read permission for owner .... 1... .... = Write permission for owner .... .0.. .... = no Execute permission for owner .... ..1. .... = Read permission for group .... ...1 .... = Write permission for group .... .... 0... = no Execute permission for group .... .... .0.. = no Read permission for others .... .... ..0. = no Write permission for others .... .... ...0 = no Execute permission for others nlink: 1 uid: 50124 gid: 50079 size: 0 used: 0 rdev: 0,0 specdata1: 0 specdata2: 0 fsid: 0x8000006400000007 fileid: 25650 atime: Mar 26, 2007 18:29:42.000000000 seconds: 1174926582 nano seconds: 0 mtime: Mar 27, 2007 12:57:37.872617455 seconds: 1174993057 nano seconds: 872617455 ctime: Mar 27, 2007 12:57:37.872617455 seconds: 1174993057 nano seconds: 872617455
Quoted 7 lines
A little bit of searching the internet explained this error and tells me that the "caller doesn't have the correct ownership to perform the requested operation", but the user is in the same _group_ as the owner and the file has reading and writing permissions for owner and group.
Is there anything I could do to prevent the "creation of zero byte files" or to get more information for debugging purpose?
There is a known issue with various BSD servers (including apparently AIX) refusing to allow anyone other than the file owner change the mtime/ctime on files (try doing 'touch foo' where 'foo' is one of the files you are seeing problems with). This breaks open(O_TRUNC), which is supposed to always change the mtime+ctime (whether or not the file size changed).
Cheers
Trond
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 10 lines · Trond Myklebust
There is a known issue with various BSD servers (including apparently AIX) refusing to allow anyone other than the file owner change the mtime/ctime on files (try doing 'touch foo' where 'foo' is one of the files you are seeing problems with). This breaks
open(O_TRUNC), which is supposed to always change the mtime+ctime (whether or not the file size changed).Cheers
Trond
Hi Trond,
thanks for your reply.
We tried to "touch" the problematic files:
Quoted 1 line
id
uid=50099(user2) gid=50079(group1) groups=50079(group1)
Quoted 1 line
stat sctestfile02
File: `sctestfile02'
Size: 8 Blocks: 8 IO Block: 8192 regular file
Device: 1dh/29d Inode: 25650 Links: 1
Access: (0660/-rw-rw----) Uid: (50124/ user1) Gid: (50079/group1)
Access: 2007-03-29 10:04:40.352616605 +0200
Modify: 2007-03-29 10:10:07.552617379 +0200
Change: 2007-03-29 10:10:07.576410231 +0200
Quoted 3 lines
touch sctestfile02
stat sctestfile02
File: `sctestfile02'
Size: 8 Blocks: 8 IO Block: 8192 regular file
Device: 1dh/29d Inode: 25650 Links: 1
Access: (0660/-rw-rw----) Uid: (50124/ user1) Gid: (50079/group1)
Access: 2007-03-29 10:13:11.582617023 +0200
Modify: 2007-03-29 10:13:11.582617023 +0200
Change: 2007-03-29 10:13:11.582617023 +0200
Quoted 1 line
ls -lrt sctestfile02
-rw-rw---- 1 user1 group1 8 2007-03-29 10:13 sctestfile02
So the file is okay now and I don't see the relation between the two issues because "user2" is allowed to change the mtime and the ctime...
Greetings
Toni
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Hi,
I called the IBM support and it seems to be an AIX issue. We're just waiting for the "efix"!
Greetings
Toni
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs