Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As per instructions in another post, I changed the ownership of files copied to my home directory with:
chown -R shay:100 /home/shay/
Worked fine.
Copied some more files, tried this again and have really messed something up.
I have lost permission to write in my Documents directory. Every file with an extension in my entire home directory has been moved to a previously non-existent "bones" directory. Just thrown in there all together, without folders. Very strange. Other users are fine.
Output of ls -al on the affected directories would help us to see what is up..
Usually when I chown files I do a chown -R shay:shay /home/shay/
Not sure why they had you assign home directory group permissions to group 100.
100 must be the users group ?
Regardless of who now owns those files root should be able to re-assign permissions to them.
Nothing chown does would move files to another directory. What else have you done with the system? (not implying you did this, but that it might be the side effect of another process)
But yes, if all your documents is now in the bones directory you will want to work from there to restore them.
User config files tends to reside in ~ (/home/<user>/) as dot (.) files or dot directories.
you want to ensure you still have those:
so ls -al ~
The -a switch shows all files (even the hidden dot ones).
There are things you could do, but probably best to assume the structure is lost, and just create a new one.
Whenever you see -R or -r in a command you need to pause, that is generally a recursion call, if you get the next bit just slightly wrong it will end up affecting everything down the tree from that point.
Often you are better off changing things without recursion first, then move to recursion when you get fed up of doing things over and over, by that time you will have a better understanding of the implications and the workings.
Thanks all. I cannot remember having done anything else, and this is < hour ago. I did restart my system, made a new user and tried copying some files to the new user (with Mepis assistant), Started up Konq and looked around. That's it afair. I certainly never typed the word 'Bones'.
Strangest to me is that only files with periods somewhere in their names (files with extensions, hidden files) were moved. Everything is there, so I'm going to move it all to another user and delete my home directory. Config files are there and I appear to have proper permission and ownership of all files.
I do need to be more careful in the future. My music folders weren't backed up and will be far to much of a PITA to rebuild. Everything else is backed up to another drive.
What are these "things I could do", Zention? Worth a try, I think.
Taking a look at your .bash_history file might help you remember anything you might have done (that can be sorted out). You'd need a weird command to accomplish what has happened, something like:
The other things revolve around harddrive recovery of deleted files and tables of inodes.
I don't do it often enough to give you explicit instructions on recovery, I would have to wade into the nuance of it. It would not be guaranteed as files have been moved, and probably take longer.
It sounds like you moved something, in which case the inode tends to get remapped, so it may also be a hiding to nothing.
There is a few good ones on the web, but I am starting to suspect people are migrating to companies and taking down their info
I will have to write an article myself at some point so I have a good reference for it, it comes up every now and again, but it is still sort of voodoo stuff.
Did you maybe use a GUI utility to change your username by mistake. Maybe you are looking in the wrong home directory. Where is this bones directory? If it is /home/bones, then this may be the case.
Quote:
Originally Posted by farslayer
Usually when I chown files I do a chown -R shay:shay /home/shay/
Some distros like Mandriva set up a group by the same name as the user when you create a new user. Others, such as SuSE do not. I created such a group manually and made it my default group.
Using "chown -R shay:users /home/shay/" would be a better way of doing it to prevent mistakes in remembering GID numbers.
Were you working on files in your home directory as root? It wouldn't be possible to move files to a system directory by mistake if you work as a regular user.
If they do exist somewhere, you might try using the find command to locate them.
For example: "find /home -ctime -2" will locate files created (or moved) in the /home directory in the last two days.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.