Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-08-2008, 02:23 PM   #1
LQ Newbie
Registered: Oct 2008
Location: Germany
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
Unhappy Cannot execute /bin/sh: Permission denied


i've got a big problem with my slackware installation. I'm using it for a long time right now and tried to update it via ssh like many times before.

Now, the update was successfull. Just some packages could not be updated because of depencies, but these were not so necessary packets like pidgin. Now after the updating the connection was lost and when I tried to start it again the answer from my machine was: "Cannot execute /bin/sh: Permission denied".

When I came home I tried to login but the same error message came up. This only happens with an user-acct. The root acct. is working perfectly, but I don't like it very much to surf and do everything on my root acct. :P

I checked the permissions of / and they are set to 755 like it has to be. Also all files (but links of course) in /bin are set to 755.

Does anybody have an idea what may be the problem?

Thanks in advance.
Old 10-08-2008, 02:34 PM   #2
Registered: Jul 2006
Posts: 47

Rep: Reputation: 15
That's bizarre. I haven't been at it for a while myself, and find the permissions a little confusing sometimes too. If you haven't already, I'd check for all links to bash or any bash-<version##-##.##> types of files and make sure they aren't linked, as well as the same for all sh-<version> or anything like that you can find. I've seen some install programs change links on things and just mess the whole thing up. Other than that, I don't have a clue what it could be.
Old 10-08-2008, 03:30 PM   #3
LQ Newbie
Registered: Oct 2008
Location: Germany
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Unfortunately, that's not the problem. But thanks for your answer.
Old 10-08-2008, 03:59 PM   #4
Senior Member
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
A user on a mailing list I'm on recently posted with this problem. They solved it and had this to say about their solution:

Thanks. But problem solved. Insufficient permissions on newly installed
libraries from glibc package.
Go through the files installed by the latest glibc package and make sure they're readable and executable by all.
Old 10-08-2008, 04:08 PM   #5
Registered: Dec 2007
Location: Slightly left of center
Distribution: slackware
Posts: 276
Blog Entries: 2

Rep: Reputation: 44
That message can also appear on the local machine when the ssh keys for the user on the remote machine don't match the last recorded attempt.

To avoid any confusion, when I say local machine, I mean the machine where you are invoking ssh, and the remote machine is the machine you wish to connect to via ssh.

On the remote machine, try editing $HOME/.ssh/known_hosts (where $HOME is the user account's home) and find the line corresponding to the IP of the remote machine, and delete that line.

ssh should then prompt you (on the local machine) for adding a unique key on the remote machine for that IP.

Something else to look at, but probably hasn't changed since the update -- check that the sshd process is running (though I believe the message on the local machine would be different in that case).
Old 10-08-2008, 04:29 PM   #6
LQ Newbie
Registered: Oct 2008
Location: Germany
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks raconteur, but I have the same problem here. I'm at the not working computer right now.

Shade, is it only the file libc in /lib and /usr/lib?

Folder /lib

-rwxr-xr-x 1 root root 1528742 2007-06-19 22:57
-rwx------ 1 root root 1570593 2008-10-08 10:32
lrwxrwxrwx 1 root root 11 2008-10-08 10:32 ->

the 700 at may be the problem, am i right? But it's the same for all other packages:

-rwxr-xr-x 1 root root 25250 2007-06-19 22:57
-rwx------ 1 root root 42592 2008-10-08 10:32
lrwxrwxrwx 1 root root 15 2008-10-08 10:32 ->

Do I have to change all these rights?

In /usr/lib it looks like this:

-rw-r--r-- 1 root root 2969776 2008-10-07 01:32 libc.a
-rwxr-xr-x 1 root root 238 2008-10-07 01:23
-rw-r--r-- 1 root root 15946 2008-10-07 01:32 libc_nonshared.a
-rw-r--r-- 1 root root 3047916 2008-10-07 01:33 libc_p.a

Also the same like for the other files in here:

-rwxr-xr-x 1 root root 1043 2008-09-18 06:22
lrwxrwxrwx 1 root root 18 2008-10-08 10:28 ->
lrwxrwxrwx 1 root root 18 2008-10-08 10:28 ->
-rwxr-xr-x 1 root root 392456 2008-09-18 06:22


But it seems that the problem on the mailing list is the same one like mine, since it started exactly after the update.

Thanks for your help
Old 10-08-2008, 07:10 PM   #7
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 5,390

Rep: Reputation: 409Reputation: 409Reputation: 409Reputation: 409Reputation: 409
Yes, reset the permissions would fix the problem
If you have a doubt about a file permission, check the MANIFEST file, available in your install disk or at one of the Slackware mirrors in:
Old 10-09-2008, 12:16 AM   #8
Senior Member
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 544Reputation: 544Reputation: 544Reputation: 544Reputation: 544Reputation: 544
My memory is fuzzy tonight, but I seem to recall that the error message you received will also occur:

1. If the shell script you are trying to run was created and saved in Windows/DOS and contains separate line feeds and carriage returns.

2. You are trying to run the script from a FAT32 partition, which provides no support for file permissions.
Old 10-09-2008, 04:28 AM   #9
LQ Newbie
Registered: Oct 2008
Location: Germany
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks Woodman, interesting point. I'm not using FAT oder Windows/DOS in anyway, but good to know.

Keefaz, thank you for the tip with the manifest-file. It was the problem. While I was updating, it changed the new libs to 700 instead off 755. I changed them back to 755 and now it is working again.

Thank you very much for your help.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot execute /bin/bash: Permission denied Z038 Slackware 13 06-23-2007 09:34 PM
Permission denied to execute anything under /home ErrorBound Linux - Software 8 07-26-2006 09:21 AM
Problem Cannot execute /bin/bash: Permission denied xeo Linux - Software 2 10-13-2004 10:55 PM
Cannot execute /bin/bash: Permission denied Hegemon Linux - General 4 01-19-2004 04:13 AM
cannot execute /bin/bash: Permission Denied peeples Linux From Scratch 24 10-25-2002 08:07 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:30 PM.

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