LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Who can tell me why? (user and group) (https://www.linuxquestions.org/questions/slackware-14/who-can-tell-me-why-user-and-group-325520/)

shadkong 05-20-2005 07:51 PM

Who can tell me why? (user and group)
 
http://www.linuxsir.org/bbs/attachme...chmentid=25661

shad@perfect:/$ pwd
/
shad@perfect:/$ ls -l
×ÜÓÃÁ¿ 86
drwxr-xr-x 2 root bin 2512 2005-05-08 20:54 bin/
drwxr-xr-x 2 root root 400 2005-05-08 22:56 boot/
drwxr-xr-x 15 root root 62520 2005-05-21 08:29 dev/
drwxrwxrwx 9 root root 264 2005-05-15 11:06 EIO_Binders/
drwxr-xr-x 53 shad users 5400 2005-05-21 08:28 etc/
drwxr-xr-x 5 root root 96 2005-05-08 13:34 home/
drwxr-xr-x 4 root root 3248 2005-05-08 20:54 lib/
drwxr-xr-x 9 root root 216 2002-03-16 15:34 mnt/
drwxr-xr-x 4 root root 96 2004-11-26 07:46 opt/
dr-xr-xr-x 68 root root 0 2005-05-21 16:28 proc/
drwx--x--- 14 root root 600 2005-05-20 18:27 root/
drwxr-xr-x 2 root bin 6456 2004-06-07 15:22 sbin/
drwxr-xr-x 2 root root 48 2004-05-12 12:03 sys/
drwxrwxrwt 16 root root 600 2005-05-21 08:30 tmp/
drwxr-xr-x 20 shad users 568 2005-05-18 13:35 usr/
drwxr-xr-x 16 root root 456 2004-07-27 11:10 var/
shad@perfect:/$

egag 05-20-2005 08:01 PM

ah...would you mind telling the Q ?

egag

shadkong 05-20-2005 08:09 PM

OK, I'm sorry.
The question is: why the directory "/usr", "/etc" and so on are owned by a normal user?
Thank you!

gbonvehi 05-20-2005 08:39 PM

Why they're owned by a normal user? That's difficult to know, you could've used chown command in a wrong way, installed a badly made package (this can happen if you made a package in wrong way, Slackware official and Linuxpackages.net are always checked) which someway changed your permissions, installed a program which handle permissions in a wrong way, etc.
It will be likely a bad made package, since the directories that has wrong permissions are the ones that software use to install itself.
It's sad to say, but reverting the permissions won't be easy if they were changed recursively that means the owner changes affected all under those directories (just get into /usr and make another ls to check this), there was a discussion about this some days ago where there was a link to a script that could handle this mostly automatically (only worked for official slackware packages).

shadkong 05-20-2005 10:52 PM

Thank you gbonvehi.
Now I know why it is. I had a d4x rpm package, and I do "rpm2tgz" with normal user, then "su -", "installpkg d4x*tgz", so it change the related dirctories' permissions.
I solve it like this: remove d4x and make another tgz package with root, then install it.

gbonvehi 05-21-2005 12:00 AM

Glad it worked :)
To avoid problems with rpm2tgz like the on you had, you can try first looking for Slackware packages here: http://www.linuxpackages.net/
Example, this is d4x Slackware package: http://www.linuxpackages.net/search_...e=d4x&ver=10.1


All times are GMT -5. The time now is 01:33 AM.