In many organizations as well as educational institutions, people used to share research documents, important financial sheets and other files within the local work station. This process is indeed very helpful in minimizing disk space consumption and availing the access of printers, scanners, CD/DVD drives etc. While working with Linux system, you need to change the ownership of the file before sharing it over the LAN or NFS. The problem arises when you have some existing issues with your root account that you can not access the applications as well as the related documents.
In such a situation of data loss of inaccessibility any Linux data recovery utility can help you recover your seemingly lost data back.
The above discussed situation seems even worse, when you try to change the ownership of the troubled hard drive volume and it flashes a number of error messages. The error messages, which you receive can be as below:
“suse:/# chown -v ryan:ryan /mnt/hdc1
failed to change ownership of `/mnt/hdc1′ to ryan:ryan
chown: changing ownership of `/mnt/hdc1′: Operation not permitted
suse:/# chmod -v 777 /mnt/hdc1
mode of `/mnt/hdc1′ changed to 0777 (rwxrwxrwx)
suse:/# ls -l /mnt/
drwxr-xr-x 4 root root 16384 1969-12-31 17:00 hdc1
Though there can be a number of reasons behind the above problem, below written are some of the prominent causes:
- The attributes settings for the directory or file is incorrect and preventing you from changing the permissions.
- Damaged root directory resulting in the inability to read the structure of the disk.
- File system corruption or superblock corruption.
If you have the root access, follow the below steps to resolve the problem:
- Check and edit your user ID from the terminal as: edit ‘/etc/fstab’ by sudo gedit /etc/fstab
- Enter the values, umask= 0000, uid= your UID value, gid= your GID value in the <options> section.
- Save the file and exit.
- Run the command ‘sudo umount -a’ from the terminal.
- Run the command ‘sudo mount -a’ from the terminal.
If the problem still exists, you need to format the drive and make fresh installation of the Linux operating system. With formatting, all your data will be erased and you can take the help of any good Linux recovery software to retrieve the formatted data back.
Guest post from Maria Peter who is working on Stellar Linux data recovery software.