User forums > General (but related to Code::Blocks)
Permission Denied though my linux chmod has allowed 777
edcompsci:
--- Code: ----------------- Build file: "no target" in "no project" (compiler: unknown)---------------
gcc -c /media/IDE/ProgrammingCode/0._Console/c_programs/pointers-addressof.c -o /media/IDE/ProgrammingCode/0._Console/c_programs/pointers-addressof.o
g++ -o /media/IDE/ProgrammingCode/0._Console/c_programs/pointers-addressof /media/IDE/ProgrammingCode/0._Console/c_programs/pointers-addressof.o
Process terminated with status 0 (0 minute(s), 2 second(s))
0 error(s), 0 warning(s) (0 minute(s), 2 second(s))
--- End code ---
--- Code: ---$ ls -lAtr
total 176
-rwxrwx--x 1 edward 1002 581 Nov 24 2013 FileExistance.c
-rwxrwx--x 1 edward 1002 2083 Mar 28 2016 playwav-sdl.c
drwxrwx--x 3 edward 1002 4096 Mar 4 21:21 cpp
drwxrwx--x 2 edward 1002 4096 Mar 4 21:21 'learning asynchronous programming'
-rwxr-xr-x 1 edward edward 120 Jun 5 10:36 test.c
-rwxr-xr-x 1 edward edward 16632 Jun 5 10:36 a.out
drwxr-xr-x 4 edward edward 4096 Jun 5 13:54 Ch02-01
drwxr-xr-x 2 edward edward 4096 Jun 5 14:40 pre-defined-headers
-rwxr-xr-x 1 edward edward 966 Jun 5 15:32 staticvar.c
-rw-r--r-- 1 root root 2960 Jun 5 15:33 staticvar.o
-rwxr-xr-x 1 root root 16808 Jun 5 15:33 staticvar
-rwxr-xr-x 1 edward edward 2576 Jun 5 16:25 bubblesort.c
-rwxr-xr-x 1 edward edward 3040 Jun 5 16:50 quicksort.c
-rwxr-xr-x 1 edward edward 235 Jun 5 16:58 using-strlen.c
-rwxr-xr-x 1 edward edward 732 Jun 6 07:03 array-passin-and-return-values.c
-rwxr-xr-x 1 edward edward 845 Jun 6 07:35 struct-pass-ins.c
-rwxr-xr-x 1 edward edward 788 Jun 6 08:10 struct-curlybracketsassign.c
-rwxr-xr-x 1 edward edward 745 Jun 6 08:14 struct-arrays-of-structs.c
-rwxr-xr-x 1 edward edward 951 Jun 6 08:19 struct-array-swap-elements.c
-rwxr-xr-x 1 edward edward 1433 Jun 6 08:23 struct-returnvalue.c
-rwxr-xr-x 1 edward edward 741 Jun 6 08:44 pointers-addressof.c
-rwxr-xr-x 1 edward edward 308 Jun 6 08:59 pointers-incrementing.c
-rwxr-xr-x 1 edward edward 495 Jun 6 09:07 pointers-incrementing-usingduplicatestring.c
-rwxr-xr-x 1 edward edward 585 Jun 6 09:13 pointers-incrementing-plusplusbefore-orafter.c
-rwxr-xr-x 1 edward edward 157 Jun 6 09:20 count.c
-rwxr-xr-x 1 edward edward 371 Jun 6 10:51 pointers-loops-increments-with-int_iterator.c
-rw-r--r-- 1 edward edward 2648 Jun 13 14:18 pointers-addressof.o
-rwxr-xr-x 1 edward edward 16624 Jun 13 14:18 pointers-addressof
--- End code ---
but I have the compiler set as gcc
oBFusCATed:
What happens if you run the executable from terminal?
Commaster:
> "no target" in "no project"
Building without a Code::Blocks project can be unhealthy indeed...
edcompsci:
--- Quote from: oBFusCATed on June 14, 2021, 01:20:53 am ---What happens if you run the executable from terminal?
--- End quote ---
--- Code: ---gcc -c pointers-addressof.c -o pointers-address-of.run
/pointers-address-of.run
bash: ./pointers-address-of.run: Permission denied
edward@zotac-desktop:/media/IDE/ProgrammingCode/0._Console/c_programs$ chmod + ./pointers-address-of.run
edward@zotac-desktop:/media/IDE/ProgrammingCode/0._Console/c_programs$ ./pointers-address-of.run
bash: ./pointers-address-of.run: Permission denied
edward@zotac-desktop:/media/IDE/ProgrammingCode/0._Console/c_programs$ sudo chmod -R 777 .
edward@zotac-desktop:/media/IDE/ProgrammingCode/0._Console/c_programs$ ./pointers-address-of.run
bash: ./pointers-address-of.run: Permission denied
edward@zotac-desktop:/media/IDE/ProgrammingCode/0._Console/c_programs$ ls -l
total 188.
.
.
-rwxrwxrwx 1 edward edward 16624 Jun 13 14:18 pointers-addressof
-rwxrwxrwx 1 edward edward 741 Jun 6 08:44 pointers-addressof.c
-rwxrwxrwx 1 edward edward 2648 Jun 14 17:34 pointers-addressof.o
-rwxrwxrwx 1 edward edward 2648 Jun 14 17:38 pointers-address-of.run
--- End code ---
So then it's not a codeblocks issue, but compiler issue.
edcompsci:
--- Quote from: Commaster on June 14, 2021, 06:32:09 am ---> "no target" in "no project"
Building without a Code::Blocks project can be unhealthy indeed...
--- End quote ---
I tried that. I started a brand new c console project, and copied the contents of my file to main.c, built it and still get permission denied.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version