[Lustre-discuss] Permission denied error when mv files

Kevin Van Maren Kevin.Vanmaren at Sun.COM
Fri Mar 6 11:00:07 PST 2009


Aaron Everett wrote:
> One more interesting tidbit. Even through the permission denied error is
> given, the file is actually written. Looking at this, it looks like the
> stat after the write fails. Am I reading that correctly?
>   
It looks like the file was only written by the "cp", not the "mv":
open("/lustre/work/aeverett/ae.lustremvtest", 
O_WRONLY|O_CREAT|O_LARGEFILE, 0100644) = -1 EACCES (Permission denied)

The similar trace around the open 
"/lustre/work/aeverett/ae.lustremvtest" in "cp" could be useful.

selinux is enabled, and is my first guess as to the problem -- have you 
tried disabling selinux?


This is the relevant section of the trace (at the end).

geteuid32()                             = 680
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo 
...}) = 0
open("/proc/filesystems", O_RDONLY)     = 3
read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 4095) = 326
open("/proc/self/attr/current", O_RDONLY) = 4
read(4, "user_u:system_r:unconfined_t\0", 4095) = 29
close(4)                                = 0
close(3)                                = 0
stat64("/lustre/work/aeverett/ae.lustremvtest", 0xbfe79170) = -1 ENOENT 
(No such file or directory)
lstat64("/tmp/ae.test", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lstat64("/lustre/work/aeverett/ae.lustremvtest", 0xbfe79060) = -1 ENOENT 
(No such file or directory)
rename("/tmp/ae.test", "/lustre/work/aeverett/ae.lustremvtest") = -1 
EXDEV (Invalid cross-device link)
unlink("/lustre/work/aeverett/ae.lustremvtest") = -1 ENOENT (No such 
file or directory)
lgetxattr("/tmp/ae.test", "security.selinux"..., 
"user_u:object_r:tmp_t", 255) = 22
open("/proc/self/attr/fscreate", O_RDWR) = 3
write(3, "user_u:object_r:tmp_t\0", 22) = 22
close(3)                                = 0
open("/tmp/ae.test", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/lustre/work/aeverett/ae.lustremvtest", 
O_WRONLY|O_CREAT|O_LARGEFILE, 0100644) = -1 EACCES (Permission denied)
write(2, "mv: ", 4mv: )                     = 4
write(2, "cannot create regular file `/lus"..., 66
cannot create regular file `/lustre/work/aeverett/ae.lustremvtest') = 66
write(2, ": Permission denied", 19: Permission denied)     = 19

Kevin




More information about the lustre-discuss mailing list