Date: Fri, 24 Dec 2010 19:57:41 -0500 From: Joe Kraft <jvk-list@thekrafts.org> To: freebsd-questions@freebsd.org Subject: Re: cpio misunderstanding? Message-ID: <if3fi6$2k4$1@dough.gmane.org> References: <if2rdo$tk5$1@dough.gmane.org> <201012242042.21257.ken@mthelicon.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Pegasus Mc Cleaft wrote: >> If I try to run it manually on one of the files that fails, I get this: >> >> slug# echo "/usr/local/freesbie-fs/libexec/ld-elf.so.1" | cpio -dump -l >> -v /usr/local/freesbie-clone >> >> /usr/local/freesbie-clone/usr/local/freesbie-fs/libexec/ld-elf.so.1 >> >> cpio: Can't create '/usr/local/freesbie-clone/usr/local/freesbie- >> fs/libexec/ld-elf.so.1': Operation not permitted >> 0 blocks >> >> >> I can use cp to copy the file, so I don't understand what's going on >> here. Does anyone have any ideas? > > I don't know if this is your problem, but whenever I see that "Operation > not permitted" error I start to suspect file flags. You might want to > check for extra flags put on the source file or destination directory and > see if anything weird had been set on it. > > You can look at the flags with the command "ls -lao". You may also want > to do a "man chflags" and read the manual page there. > OK, now I know what's going on. I just don't know why. The immutable flag was set on all these files, if you clear it cpio will happily copy them to the new directory. I'm guessing it's a change in how the installation copies the files with the schg intact, I ran into a discussion about that from 2008. The original FreeSBIE scripts were based on FBSD 6.2 and maybe never ran into this issue. I don't quite get why this works this way though. I understand the immutable flag will keep the file itself from being changed, deleted or moved. But I don't see in any documentation that the immutable flag will not allow a file to be copied. I did note that when using the 'cp' command it cleared the immutable bit on the new file instead of keeping it, but at least it makes the copy. Joe.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?if3fi6$2k4$1>