[OpenAFS] fs: You don't have the required access rights on '/afs'

Andreas Schuldei andreas@schuldei.org
Mon, 20 Dec 2004 04:51:41 +0100


On Sun, Dec 19, 2004 at 11:37:11AM -0500, Derrick J Brashear wrote:
> root is irrelevant. if admin.admin is in system:administrators, 

it is: 

tjener:~# pt_util -members
Ubik Version is: 33554432.0
system:backup 2/0 -205 -204 -204
system:administrators 130/20 -204 -204 -204
   admin.admin 1
system:ptsviewers 2/0 -203 -204 -204
system:authuser 2/0 -102 -204 -204
system:anyuser 2/0 -101 -204 -204


> and 
> root.afs is not replicated (that would be a different error) and afsd was 
> not started with -dynroot (and that would be a different again error) then 
> it should work.

here is an strace of fs sa /afs system:anyuser rl

execve("/usr/bin/fs", ["fs", "sa", "/afs", "system:anyuser", "rl"], [/* 13 vars */]) = 0
uname({sys="Linux", node="tjener.intern", ...}) = 0
brk(0)                                  = 0x80a4d70
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=9439, ...}) = 0
old_mmap(NULL, 9439, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libresolv.so.2", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240)\0\0004\0\0\0\214\371\0\0\0\0\0\0004\0 \0\7\0(\0\32\0\31\0\6\0\0\0004\0\0\0004\0\0\0004\0\0\0\340\0\0\0\340\0\0\0\5\0\0\0\4\0\0\0\3\0\0\0L\341\0\0L\341\0\0L\341\0\0\23\0\0\0\23\0\0\0\4\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0_\341\0\0_\341\0\0\5\0\0\0\0\20\0\0\1\0\0\0\0\360\0\0\0\360\0\0\0\360\0\0\204\10\0\0\250/\0\0\6\0\0\0\0\20\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=64924, ...}) = 0
old_mmap(NULL, 73640, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001b000
old_mmap(0x4002a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf000) = 0x4002a000
old_mmap(0x4002b000, 8104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4002b000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200^\1\0004\0\0\0\330\362\22\0\0\0\0\0004\0 \0\10\0(\0007\0006\0\6\0\0\0004\0\0\0004\0\0\0004\0\0\0\0\1\0\0\0\1\0\0\5\0\0\0\4\0\0\0\3\0\0\0\310`\22\0\310`\22\0\310`\22\0\23\0\0\0\23\0\0\0\4\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10s\22\0\10s\22\0\5\0\0\0\0\20\0\0\1\0\0\0 s\22\0 \203\22\0 \203\22\0\250u\0\0\4\240\0\0\6\0\0\0\0\20\0\0\2"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1244016, ...}) = 0
old_mmap(NULL, 1254180, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002d000
old_mmap(0x40155000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x127000) = 0x40155000
old_mmap(0x4015d000, 8996, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4015d000
close(3)                                = 0
munmap(0x40018000, 9439)                = 0
brk(0)                                  = 0x80a4d70
brk(0x80c5d70)                          = 0x80c5d70
brk(0)                                  = 0x80c5d70
brk(0x80c6000)                          = 0x80c6000
open("/root/.AFSSERVER", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/.AFSSERVER", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("/proc/fs/openafs/afs_ioctl", O_RDWR) = 3
ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD, 0xbffffa40) = -1 EACCES (Permission denied)
close(3)                                = 0
write(2, "fs: You don\'t have the required access rights on \'/afs\'\n", 56) = 56
exit_group(1)                           = ?


is there anything unusual there?

so, to find out what is wrong the next step would be to recompile
with debug symbols and single step through the failing function?
what should i watch out for?

this is in a self-contained user-mode-linux machine. i could put
it online and people with more clue about the internals and
interest in linux could investigate this. sam, who helped me a
lot untill now, is gone over the holidays.

in fact i put it on
http://developers.skolelinux.no/~andreas/afs-uml.tar.gz

here i start it with 
/usr/bin/linux mem=256M con0=fd:0,fd:1
 ubd0=main_server_img_cow,main_server.img
 ubd1=main_server_vice_cow,main_server.vice devfs=mount
 eth0=daemon,,unix,/var/run/uml-utilities/uml_switch.ctl