Slackware This Forum is for the discussion of Slackware Linux.
|
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-13-2006, 09:56 PM
|
#1
|
Member
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97
Rep:
|
chmod -R username / ? (Doh!)
I just accidentally typed "chmod -R username /" into a shell prompt. (i meant to type "chmod -R username .") I hit CTRL+C pretty quickly...
i realize that the filesystem is enormous and complex, and that the permissions can cause problems... what do i do now? is there a log of which files were affected?
thanks in advance,
dbc
|
|
|
07-13-2006, 10:06 PM
|
#2
|
Member
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684
Rep:
|
Do you mean chown? chmod with a username AFAIK doesn't do anything.
Regards,
Alunduil
|
|
|
07-13-2006, 10:13 PM
|
#3
|
Member
Registered: Jan 2004
Distribution: Slackware, Ubuntu
Posts: 97
Original Poster
Rep:
|
sorry, it was indeed chown. i was typing rather frantically there hoping that i havent screwed anything up...
it was "# chown -R meta4 /" (copied that from the term window)
dbc
|
|
|
07-13-2006, 10:43 PM
|
#4
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
The following will tell you which files were affected, ignoring the files under /home (there may be other locations where files can be legitimately owned by meta4, such as /proc or /var). You should run this as root (or using sudo) so that you can check the entire file system:
Code:
find / -user meta4 | grep -v '/home'
Last edited by gilead; 07-13-2006 at 10:44 PM.
|
|
|
07-13-2006, 10:44 PM
|
#5
|
Member
Registered: Oct 2004
Posts: 215
Rep:
|
You can try:
Code:
find / -group meta4 > myfiles.txt
This will find all files owned by meta4 and store them in myfiles.txt. Then you can just look through the file to see if any files should not belong to that group.
|
|
|
07-13-2006, 11:43 PM
|
#6
|
Member
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684
Rep:
|
Once you have your list satisfactory you can run this script to change them back:
Code:
for file in $(cat myfiles.txt); do chown user:group ${file}; done
I'm assuming they will have absolute paths in the output file. If they don't then it will be a bit more challenging.
Regards,
Alunduil
|
|
|
07-13-2006, 11:53 PM
|
#7
|
Member
Registered: Oct 2004
Posts: 215
Rep:
|
Yeah, the file will have absolute paths.
|
|
|
All times are GMT -5. The time now is 03:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|