Click to See Complete Forum and Search --> : Group ownership problem - resetting linux back to default


homerun
08-25-2009, 01:33 PM
I recently blundered on a multibooting linux system. I am only testing the systems, and I now hope to make this an immense learning process.

I meant to change file group ownership on all files in the data partition (/mnt/sda15), but actually started the process on /mnt instead of /mnt/sda15. Inside /mnt are about 9 different folders mounted to all my distros partitions. After about a minute I realized what I had done and shut down the system.

Three of the distros were surely effected - sda2, sda3 and sda8, which is the alphabetic order of the mounted partitions in /mnt. sda5,6,7 don't have distros installed and sd4 is the usual extended partition. For some reason, sda1 was not effected, possibly because I was using the distro in sda2 when I started to change group ownership. Actually, other distros may have been effected but they boot and seem to operate without problems.

I used Nautilus as root to change the group ownership using properties of the /mnt folder (meant to select /mnt/sda15 only). In the permissions tab, I changed the Group ownership from "root" to "users". I changed the folder access for users to "Create and Delete files". I then clicked the button titled "Apply permissions to enclose files". Since the process took longer than a few seconds, I realized what I had done and restarted the system.

I tried the following from one of the functioning distros:

cd /mnt
ls -l
drwxr-xr-x 23 root root 4096 2009-08-24 21:54 sda1
drwxr-xr-x 23 root root 4096 2009-08-24 21:40 sda10
drwxr-xr-x 4 root root 4096 2009-08-17 16:51 sda11
drwxr-xr-x 21 root root 4096 2009-08-24 21:14 sda12
drwxrwxrwt 22 root root 4096 2009-08-25 08:54 sda13
drwxr-xr-x 21 root root 4096 2009-08-24 21:23 sda14
drwxrwxrwx 12 root root 4096 2009-08-25 09:24 sda15
drwxr-xr-x 24 root root 4096 2009-08-25 12:03 sda2
drwxrwxr-x 22 root root 4096 2009-08-24 21:36 sda3
drwxrwxrwx 5 root root 4096 2009-08-23 16:58 sda6
drwxrwxr-x 4 root root 4096 2009-08-25 10:28 sda7
drwxrwxr-x 22 root root 4096 2009-08-15 11:35 sda8
drwxr-xr-x 2 root root 4096 2009-08-15 19:43 sda9

find . -group users > textfile

The only files with group ownership of "users" was in my home directories of some of the distros and the tmp of two of them. Also, the /mnt of the distro on which I ran the operation has users as the group ownership, so that did get changed.

Since I have six other functioning distros, I am not at all desperate, but wanted to solicit any ideas before I go as far as using repair capabilities of each effected distro's install disk, or just perform complete re-installation of said distros.

If anyone is interested in this, I would be glad to provide as much information as possible, as well as publish my experiences with my successful and/or futile efforts.

techwise
08-25-2009, 04:36 PM
What was the original command you ran to change the group?

saikee
08-25-2009, 04:45 PM
Can you not use in a root console the command "chown" or "usermod" to modify the ownership settings of the same folders after remounting them again? Things like this is what Bash has been made for.

homerun
08-26-2009, 10:43 AM
Perhaps changing group ownership with Nautilus didn't cause my problem, as describe below, though I still consider it a likely suspect.

This experience prompted me to immediately stop using Nautilus to change file and folder ownership permissions and use chmod and chown. I'll study the "usermod" command. However, if I had used something like "chown -r" on /mnt, I would have probably created even more problems, also explained below.

The "Apply permissions to enclosed files" does not even work as I expected in Nautilus, at least in Centos that I used to test it this morning. It only changes the permissions on the selected folder itself, not even the files within that folder. I thought is would be recursive down to the last folders and files.

If Nautilus in Fedora 11 behaves as it does in Centos, it would have only changed the group ownership to users on /mnt and not all the sda1-15 folders mounted to partitions.

The "find /mnt -group users > file.txt" confirmed that group ownership only changed on the folder mnt. I changed it back to root but the three distros still won't start properly. I plan to remove all the sda1-15 mount commands in the /etc/fstab files of the problem distros.

My testing of Nautilus to change permissions this morning on a relatively small directory tree indicates the operation is quite fast. However, when I did in on /mnt the other day, the operation would not cease and the hard drive was very active, as if Nautilus was trying to change the permissions recursively. I then did a "shutdown -r now" and it did reboot. However, that is when I could not reboot the distro I had just rebooted, Fedora 11 on sda2.

Perhaps my problem occurred due to some other operation I had performed earlier such as troubleshooting a Grub Error 18 issue.

Thanks