LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Files that root can't delete? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/files-that-root-cant-delete-629229/)

mijohnst 03-19-2008 11:13 AM

Files that root can't delete?
 
I have two systems that are NOT in a NIS. I just make sure that the accounts on one machine have the same user name, UID and password on both systems... On the drive of one server I have a directory shared out with NFS so that both machines can share data. My problem is that on the remote machine I ran "chown -R root /export/myfolder" and now I can't make any changes to that folder from either machine. I can't even delete it as root. What would cause this and how can I gain control back over this directory?

When I do an ls I see that the owner is "root" with a group of "other" so i should at least have control, right?

Thanks for the help!

jailbait 03-19-2008 12:19 PM

Quote:

Originally Posted by mijohnst (Post 3093943)
I have two systems that are NOT in a NIS. I just make sure that the accounts on one machine have the same user name, UID and password on both systems... On the drive of one server I have a directory shared out with NFS so that both machines can share data. My problem is that on the remote machine I ran "chown -R root /export/myfolder" and now I can't make any changes to that folder from either machine. I can't even delete it as root. What would cause this and how can I gain control back over this directory?

When I do an ls I see that the owner is "root" with a group of "other" so i should at least have control, right?

Thanks for the help!

Is the folder a mount point? There are restrictions on changing or deleting mount points while they are in use.

-----------------------
Steve Stites

mijohnst 03-19-2008 01:00 PM

Is that a restriction that can be disabled? I've never locked root into a situation that I couldn't delete a file or folder before. If I reboot the server do you think I'd be able to regain control?

DotHQ 03-19-2008 01:10 PM

The exports file might have a hold of it and not letting go ( unless you are suing autonfs).
rename the exports file and I'd guess you can then change or remove the files or dir in question.

jailbait 03-19-2008 02:33 PM

Quote:

Originally Posted by mijohnst (Post 3094063)
Is that a restriction that can be disabled? I've never locked root into a situation that I couldn't delete a file or folder before. If I reboot the server do you think I'd be able to regain control?

If the directory is a mount point then you can umount the file system to make the directory deletable. Some mount points cannot be umounted because Linux is using them permanently. In that case you boot a live CD and manipulate the mount point directory.

But first make sure that the directory in question is actually a mount point and that is actually the problem. Use the mount command:
mount
to list your mount points and take a look at /etc/fstab.

---------------------
Steve Stites

mijohnst 03-20-2008 10:04 PM

Thanks for the response all... I just booted to the CD to get them off...


All times are GMT -5. The time now is 07:27 PM.