Sunday, June 12, 2011

no shell: Permission denied

Last night I was working to copy the Fedora 15 (Livelock) filesystem into another filesystem, the reason is I want bigger filesystem space. Created a ext4 filesystem for that after I failed with btrfs, shit, I will working with that next time.

So here the mighty command that did the magic, both of the filesystem is ext4 and mounted, the cp's -p option is to preverse file's mode, ownership and timestamp while copying.

cp -rp /mnt/livelock/* /mnt/new-livelock

Boot the new filesystem and I got this when logging into bash.

no shell: Permission denied

I did regular procedure (ask uncle Google), someone at Fedora Forum got this problem and answered. It's about SELinux. SELinux's file labeling mechanism might intended to identify file changes outside its control. The solution is to re-labeling the new filesystem's contents or just disable SELinux. Option 1 is fine for me, remount the new filesystem and issue

touch /mnt/new-livelock/.autorelabel

SELinux will auto-relabel filesystem contents and I got new Livelock that has bigger space.