LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 11-04-2009, 11:29 PM   #1
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Rep: Reputation: 15
Thumbs down Untarred a package in / and now my permissions are boned [resolved]


As the title says. Untarred the chrome-64 binary in / after unzipping it with Ark. Boy was that silly.

I'm not sure what my permissions should look like now, nor how to fix them. Nobody but root can now log in, everything is "Permission denied."

Here's ls -l /:
Code:
drwxr-xr-x   2 root root  4096 2009-10-25 15:58 bin/
drwxr-xr-x   3 root root  4096 2009-11-03 20:06 boot/
drwxr-xr-x  14 root root 14180 2009-11-04 13:02 dev/
drwxr-xr-x  60 root root  4096 2009-10-23 12:37 etc/
drwxr-xr-x   4 root root  4096 2009-09-24 21:04 home/
drwxr-xr-x   5 root root  4096 2009-10-22 15:09 lib/
drwxr-xr-x   2 root root  4096 2009-10-25 15:58 lib64/
drwx------   2 root root 16384 2009-09-18 07:53 lost+found/
drwxr-xr-x  16 root root  4096 2009-11-04 13:02 media/
drwxr-xr-x   5 root root  4096 2009-10-27 17:27 mnt/
drwxr-xr-x   5 root root  4096 2009-10-23 12:37 opt/
dr-xr-xr-x 134 root root     0 2009-11-04 05:01 proc/
drwxr-xr-x  17 root root  4096 2009-11-04 21:25 root/
drwxr-xr-x   2 root root  4096 2009-11-02 16:48 sbin/
drwxr-xr-x   2 root root  4096 2007-04-07 16:30 srv/
drwxr-xr-x  12 root root     0 2009-11-04 05:01 sys/
drwxrwxrwt  11 root root 12288 2009-11-04 21:26 tmp/
drwxr-xr-x  19 root root  4096 2009-10-23 12:37 usr/
drwxr-xr-x  14 root root  4096 2009-10-10 00:03 var/
What should they be?

Affected directories:

Code:
./                                                          
./usr/                                                      
./usr/bin/                                                  
./usr/share/                                                
./usr/share/man/                                            
./usr/share/man/man1/                                       
./usr/share/man/man1/google-chrome.1                        
./usr/share/gnome-control-center/                           
./usr/share/gnome-control-center/default-apps/              
./usr/share/gnome-control-center/default-apps/google-chrome.xml
./etc/                                                         
./etc/cron.daily/                                              
./etc/cron.daily/google-chrome                                 
./opt/                                                         
./opt/google/                                                  
./usr/bin/google-chrome

Last edited by black hole sun; 11-05-2009 at 12:35 AM.
 
Old 11-04-2009, 11:48 PM   #2
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Lubuntu64, Slackware64, Windows 7 x64
Posts: 248
Blog Entries: 1

Rep: Reputation: 60
happened to me once. i fudged my /home directory and could not login.

check if you have changed the ownership of your /home/<user> directory.

Code:
ls -l /home/<user>
if the owner is root, pass this command in the terminal as root:

Code:
chown -R <user> /home/<user>
 
Old 11-04-2009, 11:56 PM   #3
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by slackd View Post
happened to me once. i fudged my /home directory and could not login.

check if you have changed the ownership of your /home/<user> directory.

Code:
ls -l /home/<user>
if the owner is root, pass this command in the terminal as root:

Code:
chown -R <user> /home/<user>
Did that. Changed it to me, and owner is users. But /bin/bash always just says

Cannot execute /bin/bash: Permission denied
 
Old 11-04-2009, 11:59 PM   #4
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by black hole sun View Post
Did that. Changed it to me, and owner is users. But /bin/bash always just says

Cannot execute /bin/bash: Permission denied
Which doesn't make sense since

root@darkstar:/bin# ls -l bash
-rwxr-xr-x 1 root root 803320 2008-09-21 08:56 bash*




I think something's permission is fudged so bash can't execute...

Last edited by black hole sun; 11-05-2009 at 12:00 AM.
 
Old 11-05-2009, 12:05 AM   #5
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Lubuntu64, Slackware64, Windows 7 x64
Posts: 248
Blog Entries: 1

Rep: Reputation: 60
well, you could try
Code:
chmod -R 777
. on your home dir.

and give the output to this:
Code:
[sam@slackd] >$ ls -l /bin|grep bash
-rwxr-xr-x 1 root root 785K 2008-09-21 21:26 bash*
lrwxrwxrwx 1 root root    4 2009-10-06 14:34 sh -> bash*

Last edited by slackd; 11-05-2009 at 12:06 AM.
 
Old 11-05-2009, 12:07 AM   #6
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by slackd View Post
well, you could try
Code:
chmod -R 777
.

and give the output to this:
Code:
[sam@slackd] >$ ls -l /bin|grep bash
-rwxr-xr-x 1 root root 785K 2008-09-21 21:26 bash*
lrwxrwxrwx 1 root root    4 2009-10-06 14:34 sh -> bash*
-rwxrwxrwx 1 root root 803320 2008-09-21 08:56 bash*
lrwxrwxrwx 1 root root 4 2009-09-18 08:02 sh -> bash*


Still no go . . .

I accidentally 777'd the bash file per your unedited suggestion
 
Old 11-05-2009, 12:10 AM   #7
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by black hole sun View Post
-rwxrwxrwx 1 root root 803320 2008-09-21 08:56 bash*
lrwxrwxrwx 1 root root 4 2009-09-18 08:02 sh -> bash*


Still no go . . .

I accidentally 777'd the bash file per your unedited suggestion
I changed bash back to:

-rwxr-xr-x 1 root root 803320 2008-09-21 08:56 bash*...

root@darkstar:/bin# login

darkstar login: paul
Password:
Unable to cd to "/home/paul"

Last edited by black hole sun; 11-05-2009 at 12:12 AM.
 
Old 11-05-2009, 12:12 AM   #8
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Lubuntu64, Slackware64, Windows 7 x64
Posts: 248
Blog Entries: 1

Rep: Reputation: 60
sorry abt that, did you try the home dir thing?
 
Old 11-05-2009, 12:15 AM   #9
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by slackd View Post
sorry abt that, did you try the home dir thing?
No problem, yes I did.
 
Old 11-05-2009, 12:17 AM   #10
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by black hole sun View Post
No problem, yes I did.
I even added a "test" user. Same deal - unable to cd to home directory...

I don't understand how untarring a package can create such havok.
 
Old 11-05-2009, 12:22 AM   #11
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Original Poster
Rep: Reputation: 15
I fixed it; googling led me to this:
http://www.linuxfromscratch.org/pipe...ly/016455.html

My / had the wrong permissions.
But I have a question -

What is / really? Is it actually a directory? If so how do I check its permissions?I just did a chmod 755 / and it worked. What did that command do if / isn't a directory?
 
Old 11-05-2009, 12:30 AM   #12
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Lubuntu64, Slackware64, Windows 7 x64
Posts: 248
Blog Entries: 1

Rep: Reputation: 60
Good, will remember that solution.

only "/" means mount point for root partition.
 
Old 11-05-2009, 12:35 AM   #13
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by black hole sun View Post
I fixed it; googling led me to this:
http://www.linuxfromscratch.org/pipe...ly/016455.html

My / had the wrong permissions.
But I have a question -

What is / really? Is it actually a directory? If so how do I check its permissions?I just did a chmod 755 / and it worked. What did that command do if / isn't a directory?
Ahh. ls -la / reveals the permissions of / - the "." (dot).

Excellent, I learned something tonight.

Thanks for your help slackd.
 
Old 11-05-2009, 12:37 AM   #14
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Lubuntu64, Slackware64, Windows 7 x64
Posts: 248
Blog Entries: 1

Rep: Reputation: 60
yea, man..i learned that permission for / thing, pretty weird stuff, i must add.
 
Old 11-05-2009, 12:40 AM   #15
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,108
Blog Entries: 6

Rep: Reputation: 195Reputation: 195
ls -la /
total 4576
drwxr-xr-x 20 root root 20480 2009-11-04 21:50 .
drwxr-xr-x 20 root root 20480 2009-11-04 21:50 ..

You forgot to post the . and .. perms

/ is a directory that holds bin/ boot/ dev/ etc/ ....

/home/user is 3 nested directories
/
/home
/home/user

What ever happened might have chmod 660 on / or some other perm change.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
untarred symlinks point to / sgmeunier Linux - Software 1 03-04-2008 04:31 AM
Compile Package Permissions Ownership Changes PDock Linux - General 0 08-17-2004 07:52 AM
Ok. I'm boned. (xdm autostarting and X issue) liquigel Debian 7 02-18-2004 12:41 PM
Need untarred files after installation? coldfusion713 Linux - Software 3 08-03-2003 02:16 AM
Can I move Untarred directories? Nigel_Tufnel Linux - General 5 08-08-2002 08:45 AM


All times are GMT -5. The time now is 06:58 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration