Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
keine berechtigung zum ausführen von c programmen[SOLVED]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
k0r1n
n00b
n00b


Joined: 23 Apr 2006
Posts: 27
Location: Oberschwaben

PostPosted: Wed Apr 25, 2007 12:40 pm    Post subject: keine berechtigung zum ausführen von c programmen[SOLVED] Reply with quote

hallo allerseitz,

ich habe das problem dass ich meine selbst geschriebenen c programme nicht ausführen kann.
ich habe alle erforderlichen rechte, aber auch als root geht nichts, es kommt immer der fehler:
Quote:
bash: ./aufgabe1for: Keine Berechtigung


habe den gcc 4.1.2

ls -l sagt:
Quote:
-rwxr-xr-x 1 chap chap 6435 25. Apr 14:30 aufgabe1for


make.conf:
Quote:
CHOST="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

USE="acpi X alsa apache2 -apm bash-completion berkdb cdr cli -madwifi crypt css \
cups dbus dlloader dvd dvdr firefox freetds font-server -gsm gtk gdbm gif gnome gpm \
hal imap ipv6 innodb iconv jpeg jpeg2k latin1 mad mmx mmx2 mpeg readline mmxext mysql mp3 nodrm nptl pam \
nptlonly ncurses nls ogg pan pdf php pic png python perl samba sse ssl sse2 symlink tetex unicode \
win32codecs xinerama xmms xml xml2 xv xvid zlib -qt3 -qt4 -debug -custom-cflags -netboot -static"

FEATURES = "sandbox ccache autoaddcvs"
CCACHE_SIZE="2G"
ACCEPT_KEYWORDS="~x86"
VIDEO_CARDS="i810"
ALSA_CARDS="intel8x0"
LINGUAS="de"


hier mal ein beispielprogramm, das an der fh auf ner debian box läuft:

Code:

#include <stdio.h>

int main(void){

        int spalten;
        int zeilen;
        int s;
        int z;

        printf("Geben Sie an wieviele Spalten ausgegeben werden sollen:");
        scanf("%d", &spalten);

        printf("Geben Sie an wieviele Zeilen ausgegeben werden sollen:");
        scanf("%d", &zeilen);

        for (z = 1; z <= zeilen; z = z +1 ){
                for (s = 1; s <= spalten; s = s+1 ){
                        printf("%d\t", s*z);
                }
                printf("\n");
        }
        return 0;
}


könnte auch hello world nehmen, gleiches ergebnis.


fehlt mir irgendein programm oder paket oder habe ich einen fehler in der make.conf? ich hab keinen plan :roll:
danke


Last edited by k0r1n on Wed Apr 25, 2007 1:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
xraver
Veteran
Veteran


Joined: 20 Aug 2003
Posts: 1083
Location: Halberstadt

PostPosted: Wed Apr 25, 2007 12:52 pm    Post subject: Reply with quote

Ist dein /home Verzeichnis eine extra Partion? Dann musst du in der fstab exec als Option mit eintragen.

Beispiel:
Code:
/dev/hda3               /home           ext3            user,exec       0 0

Zum Test kannst du auch dein Programm mal /tmp verschieben und ausführen.
Back to top
View user's profile Send private message
k0r1n
n00b
n00b


Joined: 23 Apr 2006
Posts: 27
Location: Oberschwaben

PostPosted: Wed Apr 25, 2007 1:03 pm    Post subject: Reply with quote

cool es geht! danke!
der code ist nicht in meinem home verzeichnis hatte bloß nen softlink auf eine andere partition und da fehlte das exec :)
schönen tag noch!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum