Totally messed up the user permissions.*want to cry*
SlackwareThis 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.
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.
Totally messed up the user permissions.*want to cry*
Hi all,
i need help.
i've done something stupid cause of my ignorance.
Im' not too familiar with chmod and did something stupid invoked
this:
Code:
#chmod -R 766 /DATA *
in / directory.
actually i wanted to make this happen inside /DATA (my own partition) only but you know the rest...
anyway, in the middle i pressed ctrl-c so not all directories changed.
but some like /bin,/boot, have changed
currently,my
fallback is just chmode -Rv 755 for directories that seems have been affected.
is that good enough?
and now after exit su and want to su again, i get this error:
I'm not sure how to correct you problem, but if your /DATA partition is just for your personal files, and you just want to get read and write permission to /DATA as a regular user, then in the future just do "chown -R your_user_name:users /DATA" will do it.
I have a /data partition for my personal data because I have several distros on my PCs and want to keep the config files that are stored in /home separate from each other so that is how I do it.
I see two choices here, one is to have a (working) Linux from which to check the working permissions on the directories and then chmod them to your own machine's equivalents, and the other is to reinstall. If you have a separate /home, have backed your data up or don't have anything to back up, it's definitely easiest done if you reinstall. If you haven't got a separate /home (if you did, you could reinstall without losing personal data), back up at least your /home and possible other important data, and boot from Slackware install disc.
This is a good example why people should not use commands with root privileges without thinking first, and preferrably using interactive mode (question per target, yes/no).
Here's the script in question if not still avaliable:
Code:
#!/bin/sh
#smprms
#Create a script to restore the filesystem permissions from the MANIFEST (stdin)
#
about_text='
# Author: Cameron Kerr
# Email: cameron.kerr@paradise.net.nz
# Website: http://homepages.paradise.net.nz/~cameronk/
# Version: 27 August 2001'
if [ $# -ne 0 ]; then
echo "USAGE: zcat MANIFEST.gz | `basename $0` > /tmp/longscript.sh" >&2
echo " su - (if not root already)" >&2
echo " /tmp/longscript.sh" >&2
exit 255
fi
echo "#!/bin/sh"
echo "#This script was generated by `basename $0` from a Slackware MANIFEST.gz"
echo "#It will restore permissions to all files listed in the MANIFEST.gz,"
echo "#even files not there, so you might like to filter out 'not found'"
echo "#messages"
echo "#"
echo "#About the generator ${about_text}"
cat | sed -e '
/^++==*/d
/^||/d
/^ *$/d
/^[-dlcbps]/{
s/^\(.*\) \(.*\)\/\(.*[^ ]\) *.* .* .* *\(.*\)$/\
chown \2.\3 \/\4\
chmod PERM\1PERM \/\4/
/PERM.*PERM/{
s/PERM.\(...\)\(...\)\(...\)PERM/u=PERM\1PERM,g=PERM\2PERM,o=PERM\3PERM/
}
/PERM.*[^ ]PERM/{
s/-//g
}
s/PERM//g
}
'
If your MANIFEST is a .bz2 file you can change the 'zcat' above to 'bzcat' and make it work. Be sure to cd into the directory where the MANIFEST is or give the full path.
Dear moderator,
sorry for the double threads, it seems i clicked twice when submitting yesterday.Too nervous
Hello guys,
thanks for the replies!
using MANIFESTO.gz and the smprms script from ,IIRC,linuxangel site quite working well didn't know what MANIFESTO.gz was all about until now...
tnx,tnx,tnx !
my su is working, sound is working. At least my slackware more usable now.
But, i don't trust my own system anymore cause of my own action .lol.. and i have
some unofficial pkg installed that probably have changed in yesterday disaster and not covered by MANIFESTO.gz .
so, now i have the reason to fresh install slackware 12.0 sometime soon!
won't forget to backup my data ofcourse.
oh yeah,b0uncer i think you know what i was trying before this mess-up you're the only one that reply in my other thread
I will update that thread after trying MORE carefully.
This is why i like about slackware and the community.Dependable most of the time..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.