PDA

View Full Version : root can't change files?



thorevenge
1st April 2007, 02:21 PM
So after a lot of stuffing around and not being able to get a lot to work, I have gone back to XMail (xmailserver.org) to deal with mail until I have more time to sort out my other config.

I am also changing machines to handle hosting. I decided to try and copy the maildirs from one machine to another but have run into a snag.

I transferred the folders using

sudo cp -Rf *

to a dir on the external disk. But I found that the dirs created are empty. Fine I tried to remove them. Won't let me.

Mmm. Seems a touch odd. Okay lets chown them. No, won't let me do that either. Original perms were root:username.

Okay, so lets chmod them and get rid of them. Nope, won't change. To 666 or 777. Okay, this is getting annoying. sudo rm -Rf * says operation not permitted and sudo rmdir -p * says the dirs arent empty.

Right, bugger sudo, lets try the trusty su.

Still not difference.

Now I was of the understanding that su was the God-all, nothing stands in your way you ask it to do it it does it type deal. But this is refusing to do what I want it to even though I am logged in as su.

Help please?

Linux_insidev2
1st April 2007, 02:26 PM
Root is god, what format is the external drive?

Please don't say NTFS.

thorevenge
1st April 2007, 02:30 PM
HFS+ :)

Yeah thats what I thought but I keep getting Perm Denied errors on trying to chmod, chown, rm any of these files.

Tis totally whacked

MacDave
1st April 2007, 02:41 PM
CLI commands won't work on directories that are locked in the Finder (in get info.)

http://macdave.com/chronicles/viewtopic.php?t=32 <-read.

Dave

thorevenge
1st April 2007, 02:43 PM
Not even when logged in as su?

Anyway, I managed to solve this (this is seriously screwed and now make me want to get my other setup running asap)

Seems the dirs were made immutable. To reverse this chflags -R noschg * is needed to rm the files correctly.

What a hassle this is...

EDIT: I spoke too soon, this hasn't fixed it.

EDIT: read and I still get Perm Denied :(

EDIT: So I had the external disk mounted over AFP to manage it. Logged into the primary box and the actions worked straight away.

Guh >.<

MacDave
1st April 2007, 02:48 PM
Select the drive in "Get Info." Make sure it is unlocked. Then disable ownership and then reenable it.

EDIT: So I had the external disk mounted over AFP to manage it. Logged into the primary box and the actions worked straight away. <-Well, yeah!!

Dave