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

Re: Problems with lchown..



 > 
 > Hmm.  Does this mean I shall rot eternally in the depths of lchown hell
 > because I was unaware of the proper order? 

Hopefully not, here is a possible checklist (hope there is no mistake
in it), checks are done at the source in case manual interventions
were done:

Check the latest libc is installed:
  # strings /lib/libc.so.6.1 | grep Compiled
   Compiled by GNU CC version egcs-2.91.57 19980901 (egcs-1.1 release).
   Compiled on a Linux 2.0.36 system on 1998/10/26.  
  - check ldconfig points to this file
if not try to upgrade it by using ar,tar with the latest package.

Check you have the right dpkg:
  # strings /usr/bin/dpkg  | grep 1.4
   1.4.0.31 (alpha).
   1.4.0.7             
if not, manually upgrade it...

Check you have a kernel which correctly returns ENOSYS for lchown:
  # echo 'main(){printf("%d\n",lchown("/",0,0));}' > foo.c
  # gcc foo.c
  # strace a.out
   [...]
   osf_setsysinfo(0xe, 0x11ffff968, 0x11ffff9d0, 0, 0x2) = 0
   getxpid()                               = 718
   SYS_208(0x120000810, 0, 0, 0x11ffff928, 0x155557239f0) = -1 ENOSYS
   (Function not implemented)
   chown("/", 0, 0)                        = 0
   fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(3, 0), ...}) = 0
   [...]

The important lines in the last test are the SYS_208 which returns
ENOSYS, then the libc automatically replace the lchown by a chown.

It this test fails grab a kernel from
http://lhpca.univ-lyon1.fr/axp/debian.html
or take from the kernel-image-packages in
http://lhpca.univ-lyon1.fr/~lprylli/alpha-kernels-2.0.35/

Regards,

Loic


Reply to: