LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 06-25-2008, 04:55 AM   #1
davemar
Member
 
Registered: Mar 2004
Location: UK
Posts: 62

Rep: Reputation: 15
Can't execute an executable, even as sudo.


I've just compiled a C program and get a permission denied error when trying to run thing.

Let's call my username 'dave'.

I've got a directory for common use for all users (and distros) on a separate partition called /data

My code is in /data/work/mycode, so if I do an 'ls -l' I get something like:

-rw-rw-r-- 1 dave users 50 2008-06-25 10:46 myprog.c
-rwxrwxr-x 1 dave users 9501 2008-06-25 10:47 myprog

So the 'x' flags are set on my executable, but I get a permission denied when typing './myprog'. I try 'sudo ./myprog' and get the same response.

I've copied the file up to /data and get the same problem.

If I do a 'ls -l' I get (for the /data part only):
drwxrwxrwx 5 root root 4096 2008-06-21 20:11 data

So it should be executable for everyone, surely? I've clearly got write permissions to the directory (and subdirectories) and I'm generating and copying files to it.

I'm currently doing this from my Suse 10.2 distro (64-bit), and I'm sure I'm not having this problem when I use my Ubuntu distro.

I feel I'm missing something really obvious!?

Cheers, Dave.
 
Old 06-25-2008, 05:17 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Does the file system have the execute permission disabled ?
 
Old 06-25-2008, 06:59 AM   #3
davemar
Member
 
Registered: Mar 2004
Location: UK
Posts: 62

Original Poster
Rep: Reputation: 15
Ah yes! The /etc/fstab file needed adjusting. It works fine now. I knew it had to be something simple for me to overlook it! Thanks for the help.
 
  


Reply



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
perl script to execute my a c executable on remote machin sharad Linux - General 5 12-14-2006 07:56 AM
shell script to execute my c executable cranium2004 Programming 2 04-06-2005 05:26 AM
Run/execute Kylix executable stormNC Programming 4 06-10-2004 02:44 PM
Why the executable file could not execute? jeson_515 Programming 3 03-14-2004 09:40 PM
Cannot execute executable files without ./ brady9953 Linux - Newbie 3 10-13-2003 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration