Hi there people! I guess I really screwed up the rights within my source-tree (and maybe share too). It all started pretty innocent. :-) I wanted to encrypt /usr and /var, which are both mounted on dedicated partions on this machine. There was still one unused partition, which I will call (and mount) /enctmp for the steps I took. This is how I did it: - cp -rpv /usr/* /enctmp - change fstab so that after a reboot /usr will be where /enctemp is now - reboot - geli init -b -e AES -l 256 [device] - geli attach [device] - newfs [device] - mount [device] /enctmp - cp -rpv /usr/* /enctemp - change fstab back to the old device, adding .eli - reboot I did the same steps for var. Note: I also have an own partition for /usr/obj/ (on a different drive). Now when booting, I am asked for a passwort twice and the system works fine - as far as I can tell, since I have only just set it up. What doesn't work, is installing world! :-O I went to /usr/src/, did a make buildworld and make buildkernel (both of which worked). Even make installkernel worked, just the world refuses to be installed: -------------------------------------------------------------->>> Making hierarchy-------------------------------------------------------------- cd /usr/src; make -f Makefile.inc1 hierarchy cd /usr/src/etc; make distrib-dirs mtree -eU -f /usr/src/etc/mtree/BSD.root.dist -p / mtree -eU -f /usr/src/etc/mtree/BSD.var.dist -p /var mtree -eU -f /usr/src/etc/mtree/BSD.usr.dist -p /usr mtree -eU -f /usr/src/etc/mtree/BSD.include.dist -p /usr/include mtree -deU -f /usr/src/etc/mtree/BSD.sendmail.dist -p / cd /; rm -f /sys; ln -s usr/src/sys sys cd /usr/share/man/en.ISO8859-1; ln -sf ../man* . ln: ./man1: Operation not permitted ln: ./man1aout: Operation not permitted ln: ./man2: Operation not permitted ln: ./man3: Operation not permitted ln: ./man4: Operation not permitted ln: ./man5: Operation not permitted ln: ./man6: Operation not permitted ln: ./man7: Operation not permitted ln: ./man8: Operation not permitted ln: ./man9: Operation not permitted *** Error code 1 Stop in /usr/src/etc. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. It would seem that somewhere in this copy-orgy, some file or directory permissions (or ownership?) got messed up. Is there a way to correct this (preferably automagically)? If rebuilding /usr/src is all it takes, no problem, I have a DSL. It will take a while, but it won't kill me. :-) Is there any documentation about what the ownerships and permissions should be? Best regards from Germany, Chris
On Fri, May 7, 2010 at 11:05 AM, Christian Baer <christian.baer@uni-dortmund.de> wrote:> Hi there people! > > I guess I really screwed up the rights within my source-tree (and maybe > share too). It all started pretty innocent. :-) > > I wanted to encrypt /usr and /var, which are both mounted on dedicated > partions on this machine. There was still one unused partition, which I > will call (and mount) /enctmp for the steps I took. This is how I did it: > > - cp -rpv /usr/* /enctmpThis is where you went wrong. -r = -RL (see cp(1) man page). This caused cp change the symbolic links to directories. You should have used either: cp -Rpv /usr/* /enctmp or used tar: tar -cf -cf - -C /usr/ . | tar -xpf - -C destdir NOTE: tar would have preserved the hardlinks.> What doesn't work, is installing world! :-O I went to /usr/src/, did a > make buildworld and make buildkernel (both of which worked). Even make > installkernel worked, just the world refuses to be installed: > > -------------------------------------------------------------- >>>> Making hierarchy > -------------------------------------------------------------- > cd /usr/src; make -f Makefile.inc1 hierarchy > cd /usr/src/etc; ? ? ? ? ? ? ? ?make distrib-dirs > mtree -eU ?-f /usr/src/etc/mtree/BSD.root.dist -p / > mtree -eU ?-f /usr/src/etc/mtree/BSD.var.dist -p /var > mtree -eU ?-f /usr/src/etc/mtree/BSD.usr.dist -p /usr > mtree -eU ?-f /usr/src/etc/mtree/BSD.include.dist ?-p /usr/include > mtree -deU ?-f /usr/src/etc/mtree/BSD.sendmail.dist -p / > cd /; rm -f /sys; ln -s usr/src/sys sys > cd /usr/share/man/en.ISO8859-1; ln -sf ../man* . > ln: ./man1: Operation not permitted > ln: ./man1aout: Operation not permitted > ln: ./man2: Operation not permitted > ln: ./man3: Operation not permitted > ln: ./man4: Operation not permitted > ln: ./man5: Operation not permitted > ln: ./man6: Operation not permitted > ln: ./man7: Operation not permitted > ln: ./man8: Operation not permitted > ln: ./man9: Operation not permittedThe problem here is that these are now directories, instead of links. Your /usr/share/man/en.ISO8859-1 shoud look like: # ls -l /usr/share/man/en.ISO8859-1 total 20 drwxr-xr-x 2 man wheel 2 Feb 7 09:47 cat1 drwxr-xr-x 2 man wheel 2 Feb 7 09:47 cat1aout drwxr-xr-x 2 man wheel 2 Feb 7 09:47 cat2 drwxr-xr-x 2 man wheel 2 Feb 7 09:47 cat3 drwxr-xr-x 7 man wheel 7 Feb 7 09:47 cat4 drwxr-xr-x 2 man wheel 2 Feb 7 09:47 cat5 drwxr-xr-x 2 man wheel 2 Feb 7 09:47 cat6 drwxr-xr-x 2 man wheel 2 Feb 7 09:47 cat7 drwxr-xr-x 6 man wheel 6 Feb 7 09:47 cat8 drwxr-xr-x 2 man wheel 2 Feb 7 09:47 cat9 lrwxr-xr-x 1 root wheel 7 May 6 07:24 man1 -> ../man1 lrwxr-xr-x 1 root wheel 11 May 6 07:24 man1aout -> ../man1aout lrwxr-xr-x 1 root wheel 7 May 6 07:24 man2 -> ../man2 lrwxr-xr-x 1 root wheel 7 May 6 07:24 man3 -> ../man3 lrwxr-xr-x 1 root wheel 7 May 6 07:24 man4 -> ../man4 lrwxr-xr-x 1 root wheel 7 May 6 07:24 man5 -> ../man5 lrwxr-xr-x 1 root wheel 7 May 6 07:24 man6 -> ../man6 lrwxr-xr-x 1 root wheel 7 May 6 07:24 man7 -> ../man7 lrwxr-xr-x 1 root wheel 7 May 6 07:24 man8 -> ../man8 lrwxr-xr-x 1 root wheel 7 May 6 07:24 man9 -> ../man9 To fix this, just delete the man1* - man9 directories, and run make installworld. Since /usr/share/man is not needed during an installworld, the best solution to recover diskspace is to remove this directory: cd /usr/src rm -rf /usr/share/man make installworld This would let installworld recreate the man hierarchy. NOTE: There might be other locations where symbolic links were changed to directories, just remove those directories and re-run 'make installworld'. Scot