Chris Adams wrote: > Once upon a time, Björn Persson <bjorn@xxxxxxxxxxxxxxxxxxxx> said: > > I can imagine that the file permissions might be wrong, although they > > seem OK to me, but the error is that the directory doesn't exist. Why > > are the directories removed and not re-created? > > You mention the probable cause, but you don't show the perms. The best > way to get the perms correct is to: > > - umount /var/cache/mock > - chown --reference=/var/cache/mock /disk/data/mock > - chmod --reference=/var/cache/mock /disk/data/mock > - chcon --reference=/var/cache/mock /disk/data/mock > - mount -t bind /disk/data/mock /var/cache/mock I moved the whole tree with cp -a and replaced the original /var/cache/mock with a symbolic link. When that didn't work I tried a bind mount instead. Thus I can't use /var/cache/mock as a reference, but the permissions should be right since I used cp -a. What I have now is: [root@hactar ~]# ls -la /var/cache/mock/ totalt 16 drwxr-sr-x 3 root mock 4096 13 feb 17.17 . drwxr-xr-x. 18 root root 4096 13 feb 16.58 .. drwxr-sr-x 5 root mock 4096 13 feb 17.17 fedora-rawhide-x86_64 [root@hactar ~]# mount /disk/data/mock/ [root@hactar ~]# ls -la /var/cache/mock/ totalt 32 drwxrwsr-x 7 root mock 4096 13 feb 18.10 . drwxr-xr-x. 18 root root 4096 13 feb 16.58 .. drwxr-sr-x 5 root mock 4096 8 mar 2010 fedora-11-x86_64 drwxr-sr-x 5 root mock 4096 6 feb 02.35 fedora-13-x86_64 drwxr-sr-x 5 root mock 4096 29 aug 17.03 fedora-14-i386 drwxr-sr-x 5 root mock 4096 28 aug 00.26 fedora-14-x86_64 drwxr-sr-x 5 root mock 4096 2 aug 2010 fedora-rawhide-i386 The former works and the latter does not. I see one difference, the group write permission. Let's try removing that. [root@hactar ~]# chmod g-w /disk/data/mock/ [root@hactar ~]# ls -la /var/cache/mock/ totalt 32 drwxr-sr-x 7 root mock 4096 13 feb 18.23 . drwxr-xr-x. 18 root root 4096 13 feb 16.58 .. drwxr-sr-x 5 root mock 4096 8 mar 2010 fedora-11-x86_64 drwxr-sr-x 5 root mock 4096 6 feb 02.35 fedora-13-x86_64 drwxr-sr-x 5 root mock 4096 29 aug 17.03 fedora-14-i386 drwxr-sr-x 5 root mock 4096 28 aug 00.26 fedora-14-x86_64 drwxr-sr-x 5 root mock 4096 2 aug 2010 fedora-rawhide-i386 Nope. It still fails in the same way. > Alternately, rather than using bind mounts, you could edit > /etc/mock/site-defaults.cfg to move from /var/{lib,cache}/mock to > /disk/data/mock. You still need to get the permissions correct though. Even that doesn't help. Maybe it isn't caused by the bind mount after all. I see this note in site-defaults.cfg: # Note: the path pointed to by basedir and cache_topdir must be owned # by group 'mock' and must have mode: g+rws so I put that write permission back. It still fails. So it's not caused by the permissions that ls -l shows, and SElinux is disabled. The only difference in mount options is that / is mounted with relatime and /disk/data with noatime. Is it conceivable that Mock doesn't work with noatime? What else is there to check? Björn Persson
Attachment:
signature.asc
Description: This is a digitally signed message part.
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel