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 .
11-05-2009, 12:29 AM
#1
Member
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
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 ..
11-05-2009, 12:48 AM
#2
Member
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
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.
if the owner is root, pass this command in the terminal as root:
Code:
chown -R <user> /home/<user>
11-05-2009, 12:56 AM
#3
Member
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
Original Poster
Quote:
Originally Posted by
slackd
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.
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
11-05-2009, 12:59 AM
#4
Member
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
Original Poster
Quote:
Originally Posted by
black hole sun
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 ..
11-05-2009, 01:05 AM
#5
Member
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Thanked: 38
well, you could try
. 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 ..
11-05-2009, 01:07 AM
#6
Member
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
Original Poster
Quote:
Originally Posted by
slackd
well, you could try
.
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
11-05-2009, 01:10 AM
#7
Member
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
Original Poster
Quote:
Originally Posted by
black hole sun
-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 ..
11-05-2009, 01:12 AM
#8
Member
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Thanked: 38
sorry abt that, did you try the home dir thing?
11-05-2009, 01:15 AM
#9
Member
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
Original Poster
Quote:
Originally Posted by
slackd
sorry abt that, did you try the home dir thing?
No problem, yes I did.
11-05-2009, 01:17 AM
#10
Member
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
Original Poster
Quote:
Originally Posted by
black hole sun
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.
11-05-2009, 01:22 AM
#11
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?
11-05-2009, 01:30 AM
#12
Member
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Thanked: 38
Good, will remember that solution.
only "/" means mount point for root partition.
11-05-2009, 01:35 AM
#13
Member
Registered: Jul 2004
Distribution: Slackware Current
Posts: 124
Thanked: 0
Original Poster
Quote:
Originally Posted by
black hole sun
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.
11-05-2009, 01:37 AM
#14
Member
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Thanked: 38
yea, man..i learned that permission for / thing, pretty weird stuff, i must add.
11-05-2009, 01:40 AM
#15
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.
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 02:21 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
LQ Podcast
LQ Radio