Author Topic: Permission Denied / No Code Formatting & Auto-Complete  (Read 6192 times)

Offline Linuxx

  • Multiple posting newcomer
  • *
  • Posts: 17
Permission Denied / No Code Formatting & Auto-Complete
« on: January 30, 2010, 05:20:11 pm »
Hello Everyone!

Since autumn I go to class for learning C++ and since then I am using CB. Must admit, it is a very nice piece of software and I really enjoy using it! I have it installed on three machines; two running window$ and one running ubuntu 9.10

However, some time ago it started creating more and more problems. The ones I'm struggling with now, are the following:
- When coding, up till now CB would always give me auto-complete options for what I was typing and the code was highlighted (e.g. "int" would always be blue and so on...).
- Next thing is that , when clicking on "build and run", I get an error message saying "sh: /home/[user]/[directory]/[prog. name]: Permission denied.

You should perhaps know that, not very long ago, CB would crash upon startup, and based on a recommendation from the forum, I deleted  "default.conf". After that CB started up again and I was really pleased to see that! However, I never used it again on that particular machine, so I believe that the latest error was present ever since and that it may have something to do with the above mentioned deleting of the config file.

As you can see by the error message, this thread is about CB running on my ubuntu machine.

And yes, I searched the internet before bothering you people! However, the comments I found did not exactly match my situation, because they mostly talk about a newly installed copy of CB; mine was running for about four months...

Hope you can help me...

Thanks!


Linuxx
« Last Edit: January 30, 2010, 05:25:50 pm by Linuxx »

Offline TerryP

  • Multiple posting newcomer
  • *
  • Posts: 26
    • My journal
Re: Permission Denied / No Code Formatting & Auto-Complete
« Reply #1 on: January 30, 2010, 06:20:22 pm »
Quote from: linuxx
Next thing is that , when clicking on "build and run", I get an error message saying "sh: /home/[user]/[directory]/[prog. name]: Permission denied.

What are the permissions on the file(s) in question and the directory?
Just Another Computer Geek

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Permission Denied / No Code Formatting & Auto-Complete
« Reply #2 on: January 30, 2010, 06:31:12 pm »
Perhaps you could do, as root :
chown -R [user]:[user] /home/[user]

It should repair permissions on your own files.
Kernel Extremist - PedroM power ©

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Permission Denied / No Code Formatting & Auto-Complete
« Reply #3 on: January 30, 2010, 08:29:38 pm »
What are the permissions on the file(s) in question and the directory?
:lol:
Why do you think we can tell? It's your PC/installation. However, just type:
ls -lisa
...on a shell and find out yourself. Most interesting are the parent directories, too. If you are not allowed to write in any of the parents, you won't be able to create child directories.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Linuxx

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Permission Denied / No Code Formatting & Auto-Complete
« Reply #4 on: March 14, 2010, 07:42:05 pm »
Hi Folks!

Thanks for your answers!

I tried absolutely everything and I cannot seem to get CB to work again! It can't be that I'm the only one out there, struggling with this problem... My only option until now, was to use another machine - a window$ machine! Now, doesn't that somehow hurt?

Look, I'm rather new to linux (despite my user name) and to regularly using CB. I'm really willing to learn and to improve my skills. However, this thing makes me go ballistic! I haven't made any changes to my system (at least not that I am aware of) except that I kept it up to date. I've done all of this chmod and chown thing and I tried a lot more.

Here comes a brief description of my problem again, and I kindly ask you linux / CB cracks to please help me (and all of those other users, reading this thread) by giving "us" a step-by-step description of what there is to be done:
- No auto code completion
- No code formatting (start by entering something simple like #include <iostrem> that should turn green)
- A message, when clicking on "build and run" saying "sh: /home/[user]/[directory]/[prog. name]: Permission denied"

One thing I did, because CB would crash upon startup, was to delete the "default.conf"

Oh, by the way: Files & projects that already exist, run fine and the code formatting is there. Entering new code within one of these even works like it should. When working on an existing file, there seems to be absolutely nothing wrong.

Hope you can help!

Thanks!


Linuxx

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Permission Denied / No Code Formatting & Auto-Complete
« Reply #5 on: March 14, 2010, 08:52:43 pm »
Oh, by the way: Files & projects that already exist, run fine and the code formatting is there. Entering new code within one of these even works like it should. When working on an existing file, there seems to be absolutely nothing wrong.

Do I understand correctly, thta it is just one project that does not work, everything else is okay ?

Please post the output of
Quote
find [/path/to/projects/root-dir] -exec ls -ld {} \;
to see the permissions of the whole projects source-tree.

You can also try to create a new empty project, create empty files and just copy and paste the content to the newly created files.
Don't forget to type the correct file-extensions (cpp for c++ ...).

I still don't know what went wrong, but I do not think it's a C::B problem.

Offline Linuxx

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Permission Denied / No Code Formatting & Auto-Complete
« Reply #6 on: March 15, 2010, 08:12:44 pm »
Jens

I checked the permissions and they are ok (compared them to http://www.tuxfiles.org/linuxhelp/filepermissions.html).

You wouldn't believe this, but you gave me the hint that seems to have solved the issue. All I had to do was to physically type the file extension when saving. I may look like a complete fool now and perhaps I am one, but in the past I never had to do this. Maybe someone can explain to me why this all of a sudden has become necessary...??? I wonder if my computer is a female - it sometime does things that cannot be explained by logic ;-) ***my wife is sitting next to me, but she doesn't see what I'm typing*** Anyhow, you saved my life - or let's say my CB installation... Thanks a lot!

Linuxx