[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] (RaQ2) Werid permissions disaster.



Ariel Manzur wrote:
> 
> Hi..
> 
> I telnet into the RaQ2 and I this error:
> 
> ---
> No directory /home/sites/home/users/admin!
> Logging in with home = "/".
> touch: /home/sites/home/users/admin/.bash_history: Not a directory
> chmod: /home/sites/home/users/admin/.bash_history: Not a directory
> bash: /home/sites/home/users/admin/.bash_profile: Not a directory
> ---
> 
> So I go to /home/sites, and type "ls -l home" and get this:
> 
> br-SrwSr-t 28750 25970    21839     33,  34 Nov  1  2014 home
> 
> So I can't access the files inside /home/sites/home.. Is there any way to
> restore the permissions ("home" is not a directory anyore..) I tryed "chmod
> 1755 home", but it doesn't work..
> 
> Any ideas? also, is there any log to see what could have caused this?
> 

Still there ?:( I'v seen such on an old Qube (one of the first),
but it was on a few binaries (chmod for one!) and not on a directory.

Logs are in /var/log but a lot of cryptic kernel driver errors is
all you can expect there.

Hookup a terminal to the serial port, get logged in and if you get
that far, do 
	# /sbin/telinit -t0 1
and wait for the system to go single user. Then if your're still
in control,
	# umount -a
and finally
	# mount -nro remount /

Now you can start, do
	# fsck -f -y /dev/hda1
and then on /dev/hda3 and /dev/hda4 and then,
	# mv home junk
	# mkdir /home
	# mount -nwo remount /
	# mount -a

Now, look into /home/lost+found, and if you're still there, decide
whether you think it is worth cleaning up (or, in a perfect world,
find your files all intact where they belong ...)

Deciding on whether or not to (try to!) reboot before or somewhere 
in between is best left to you. Any advice could be wrong here.

On another track, you could pull the plugs, get the disk out,
put it into some linux box, and see if you can salvage the /home
partition since in your case, the trashed inode is on the / partition
and the most valuable data is probably inside /home which is on
/dev/hda4 I think.
On a simple intel linux box you could use the second IDE connector
and see your RaQ disk appear as /dev/hdc
-- 
Niels Poppe - org.net bv <niels@xxxxxxxxxx>