![]() |
Quick help required! I accidently used CHOWN and CHMOD at $
Hi...
I accidently did a chown -R user:root * at $ to top that.. I also did chmod -R 755 * at $ I am not sure exactly what has changed ..I mean permissions on my $ (folders and files) and ownership... can any one help me revert this.. .. please...thanks already... |
Re: Quick help required! I accidently used CHOWN and CHMOD at $
That shouldn't break anything.
You ran it as the normal user ($ prompt rather than # prompt), and presumably from within the user's home directory, so all it'll have done is changed the group ownership of all files to root (doesn't matter - as it's a single-user system, the group ownership of the user's files shouldn't affect anything) and granted everyone read (and execute) access to all files (again, not really important on a single user system). Do you actually see any issues? |
Re: Quick help required! I accidently used CHOWN and CHMOD at $
now i am not sure if it did change anything...it showed that operation not permitted for certain files..but not for all...
so i am sure some operation was performed on the remaining files..and it seemed like a recursive call for all the files / folders..within $... now when I do $ ls -l it shows that certain files have user users user root root root so what exactly are these against the files / folders.. one is the owner/group? and how does this affect.. i can see all diff permissions on these entries .. like r w x ..values.. :((( .... |
Re: Quick help required! I accidently used CHOWN and CHMOD at $
I guess you could simply change ownership back to user by calling from home directory
Code:
chgrp -R user * Just curious: why did you do that? Some script running wild or testing random commands or what did you try to do? |
Re: Quick help required! I accidently used CHOWN and CHMOD at $
Quote:
Quote:
Code:
-rwxr--r-- 1 user games 123 Nov 1 12:34 somefile
|
Re: Quick help required! I accidently used CHOWN and CHMOD at $
Quote:
thanks guys..for the support and quick help ..and guidance.. i ll sure learn from ur tips and also guide some newbie like me in future ;) |
Re: Quick help required! I accidently used CHOWN and CHMOD at $
Are you sure the cd didn't succeed? Where did you intend to change directory to? Just before the $ will show the place where you are currently in the file system. If you are in /home/user it should show ~
Was this what was shown before you executed the chown chmod commands? |
Re: Quick help required! I accidently used CHOWN and CHMOD at $
Quote:
yes it did not succeed....i learnt late why it didn't ..i was using tab to fill in the folder name while typing...all in a hurry.. i still am not able to do what i intended to sort out...the files in this folder are with permissions -rw-r--r-- which i want to change to -rwxrwxrwx if i do ls -l i get -rw-r--r-- 1 user root <size> <sort of timestamp> <filename> why is chmod -R 777 * not working here? any idea ? i tried it at $ and also using sudo gainroot.. didn't work either time.. |
Re: Quick help required! I accidently used CHOWN and CHMOD at $
That's exactly why I asked you if you were in your home folder denoted by ~ before the $ prompt or you are in /home/user/MyDocs.
These are basically part of two separate file systems. /home/user becomes part of /home which is ext2. So changing file permissions will work there. However, /home/user/MyDocs is a VFAT file system. Changing file permissions will not work there. Do one simple example: In your ~ folder (/home/user) create a file as: Code:
~ $ touch tmp_file Code:
~ $ chmod 777 tmp_file Now cd to /home/user/MyDocs and repeat this procedure. The file created there will have permissions -rw-r--r--. Also the group owner will be root and not users. If you try chmod 777 on the tmp_file here the permissions will still remain as -rw-r--r--. |
Re: Quick help required! I accidently used CHOWN and CHMOD at $
Permissions Fail.
|
All times are GMT. The time now is 11:33. |
vBulletin® Version 3.8.8