Date: Wed, 06 Oct 2004 11:23:27 +0200 From: Remko Lodder <remko@elvandar.org> To: Brian <Brian@bossbox.com> Cc: freebsd-questions@freebsd.org Subject: Re: Cp -Rp Nightmare unable to access /usr Message-ID: <4163B98F.1050409@elvandar.org> In-Reply-To: <200410060735.i967ZGXL009001@emboss.bossbox.com> References: <200410060735.i967ZGXL009001@emboss.bossbox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Brian wrote: > Hi, > > I'm running a FreeBSD 5.2.1 test box at home for Apache,PHP,MySQL. > > I wanted to move the default mysql dabatse location from /var/db/mysql to > /usr/mysql > > What I did was cp -Rp /var/db/mysql /usr > > I know now it was wrong for the most part I know how stupid this idea was. > > I now can't ssh to the box I get the error below > > Could not chdir to home directory /home/reports: Permission denied > /usr/local/bin/bash: Permission denied /home lives in /usr/home so it is able that you overwrote permissions for that, strangely enough you aren't even allowed to access bash, so it seems to me that more happened then just a recursive copy of /var/db/mysql to /usr... you should chown them back to the original user (if you can still login as root preferable at the console, ls -lart and check the permissions on the directories...) and next time consider something like: cp -pr /var/db/mysql /usr (so that the entire directory gets copied instead of recursive access all dirs and copy them with file information preservation (permissions,timestamp etc) into /usr If you are not able to do that, then it seems that it really got messed up, what you can do then is use a freesbie cd (live cd) to boot the system, access the data on it and backup the data. Then a reinstall would cause everything to return to normal. This is how i would do it, any better suggestions are of course welcome! :-) Cheers! > > What I'm looking to know is, what exactly have I done to /usr and if I'm at > the console can I easiliy reverse what I did ? > > Thanks in advance. > > Brian > -- Kind regards, Remko Lodder |remko@elvandar.org Reporter DSINet |remko@dsinet.org Projectleader Mostly-Harmless |remko@mostly-harmless.nl Founder Tienervaders |remko@tienervaders.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4163B98F.1050409>