bash permission denied

hi there
i am a new bee >:(
i’ve downloaded eclipse, and untar the file. When i tried to run eclipse i get the message:
bash: ./eclipse: Permission denied

i am using
opensuse 11.1 x86_64

kernel: Linux 2.6.27.7-9-default x86_64

java: 1.6.0_11

eclipse rights: -rwxr-xr-x 1 hdayi users eclipse

and when i use the file command:

eclipse: ELF 64-bit LSB executable, 
x86-64, version 1 (SYSV), 
for GNU/Linux 2.6.4, 
dynamically linked (uses shared libs), not stripped

i could not think anything, please help :slight_smile:

For a quick fix, if you’re the only user on that machine, try

sudo chown -R <your username> /opt/eclipse

Got that from some other forums re: eclipse. The error message isn’t terribly helpful, but apparently, it’s a permissions problem.

If it’s a multiuser machine, you might have to change ownership to a common group and grant everyone in that group permissions. But at least this will tell you if that’s the problem.

it’s a single user computer.
i’ve extracted eclipse into my home directory not into opt and every file’s owner is my username and my group.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You’re trying to Execute to execute a file… so is the Execute bit
set? If not then you don’t have permissions. As a note I downloaded
Eclipse 3.4 yesterday for x86_64, extracted it, and it had this bit set
so I’m not sure why yours would not. Run the following commands (in
order) and post the output and then try again (be sure you are in the
directory where the eclipse binary exists, of course):

ls -l ./eclipse
chmod +x ./eclipse
ls -l ./eclipse

Good luck.

hdayi wrote:
> it’s a single user computer.
> i’ve extracted eclipse into my home directory not into opt and every
> file’s owner is my username and my group.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJcKkJ3s42bA80+9kRApeCAJ0fHslC3F39PnwwQ7J9Smwqpr7A3ACfTopf
7ccxQZkvZKrJ9pGyC/pDlzQ=
=KBSs
-----END PGP SIGNATURE-----

execute bit is set. i did what you said, see the fallowing :

............/eclipse> ls -l ./eclipse
-rwxr-xr-x 1 hdayi users 67927 2008-09-23 09:50 ./eclipse
............/eclipse> chmod +x ./eclipse
............> ls -l ./eclipse
-rwxr-xr-x 1 hdayi users 67927 2008-09-23 09:50 ./eclipse
............/eclipse> ./eclipse
bash: ./eclipse: Permission denied

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You are user ‘hdayi’ on the machine, right? Strange… do you perhaps
have these files in a place where execution is disabled? Please post
the output from the following command and also tell us where in the
filesystem Eclipse resides (absolute path):

mount

Good luck.

hdayi wrote:
> execute bit is set. i did what you said, see the fallowing :
>
> Code:
> --------------------
> …/eclipse> ls -l ./eclipse
> -rwxr-xr-x 1 hdayi users 67927 2008-09-23 09:50 ./eclipse
> …/eclipse> chmod +x ./eclipse
> …> ls -l ./eclipse
> -rwxr-xr-x 1 hdayi users 67927 2008-09-23 09:50 ./eclipse
> …/eclipse> ./eclipse
> bash: ./eclipse: Permission denied
>
> --------------------
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJcK8f3s42bA80+9kRAnjkAJ4+Mx7gg5G/oWQulz1SGsaKJSLoLwCcDfpu
zbpJriy5X/yVAfztFDx5rCU=
=7mRE
-----END PGP SIGNATURE-----

/dev/sdb2 on / type ext3 (rw,acl,user_xattr)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sdb3 on /home type ext3 (rw,acl,user_xattr)
/dev/sdb4 on /mnt/depo type ext3 (rw,noexec,nosuid,nodev,acl)
/dev/sda1 on /windows/C type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=512)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/proc on /var/lib/ntp/proc type proc (ro)

the path is: /mnt/depo/Install/Python/eclipse>

i’ve copied eclipse to ntfs partition but i had the same message.

i can not beleive this. after sending the message i moved eclipse to /opt directory. i’ve changed owner group, and it worked. lol!

but what’s the problem with that partition?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nothing… as I suggested earlier:

/dev/sdb4 on /mnt/depo type ext3 (rw,noexec,nosuid,nodev,acl)
/dev/sda1 on /windows/C type fuseblk
(rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=512)

‘noexec’ means nothing in there can be executed. You copied it
somewhere you were allowed to execute. This is a security feature when
applied, typically, and makes sense for (at least) NTFS since nothing
there is generally executable in Linux, and if anything is it may be a
virus. Anyway you shouldn’t typically be playing in directories like
/opt unless it’s a system-wide application you’re using. In my case I
create ‘apps’ in my user’s home directory (/home/ab/apps) and then put
everything for myself in there. You do not have ‘noexec’ on your /home
partition so that should be fine for you as well.

Good luck.

hdayi wrote:
> i can not beleive this. after sending the message i moved eclipse to
> /opt directory. i’ve changed owner group, and it worked. lol!
>
> but what’s the problem with that partition?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJcLiS3s42bA80+9kRArrvAJ4snrt0bAby6H+5Ysu/e2fe5bgj4ACeOJ7k
D2LDxq6PykHhyZ6BJL4aXMs=
=GjEl
-----END PGP SIGNATURE-----

thank you very much.
i’ve changed fstab ooptions and it works now. i am moving back eclipse into the location at first :slight_smile: