LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Thread Tools
Old 11-05-2009, 12:29 AM   #1
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
Thumbs down Untarred a package in / and now my permissions are boned [resolved]


[Log in to get rid of this advertisement]
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 01:35 AM..
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 12:48 AM   #2
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Blog Entries: 1
Thanked: 38
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>
linuxslackware slackd is offline     Reply With Quote
Old 11-05-2009, 12:56 AM   #3
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0

Original Poster
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
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 12:59 AM   #4
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0

Original Poster
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 01:00 AM..
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 01:05 AM   #5
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Blog Entries: 1
Thanked: 38
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 01:06 AM..
linuxslackware slackd is offline     Reply With Quote
Old 11-05-2009, 01:07 AM   #6
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0

Original Poster
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
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 01:10 AM   #7
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0

Original Poster
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 01:12 AM..
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 01:12 AM   #8
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Blog Entries: 1
Thanked: 38
sorry abt that, did you try the home dir thing?
linuxslackware slackd is offline     Reply With Quote
Old 11-05-2009, 01:15 AM   #9
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0

Original Poster
Quote:
Originally Posted by slackd View Post
sorry abt that, did you try the home dir thing?
No problem, yes I did.
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 01:17 AM   #10
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0

Original Poster
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.
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 01:22 AM   #11
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0

Original Poster
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?
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 01:30 AM   #12
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Blog Entries: 1
Thanked: 38
Good, will remember that solution.

only "/" means mount point for root partition.
linuxslackware slackd is offline     Reply With Quote
Old 11-05-2009, 01:35 AM   #13
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0

Original Poster
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.
linux black hole sun is offline     Reply With Quote
Old 11-05-2009, 01:37 AM   #14
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Blog Entries: 1
Thanked: 38
yea, man..i learned that permission for / thing, pretty weird stuff, i must add.
linuxslackware slackd is offline     Reply With Quote
Old 11-05-2009, 01:40 AM   #15
disturbed1
Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 381
Thanked: 62
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.
linuxslackware disturbed1 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


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


All times are GMT -5. The time now is 02:21 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration