1

When I try to compile my C/C++ code in Code::Blocks, it says

obj/directory cannot be created

When I searched for that error, people suggested that it doesn't have read and write permissions for that directory.

So, one user suggested running the following command:

chown user.user * 

where user is the username of the computer. I've tried that, but nothing happened.

slhck
  • 223,558
  • 70
  • 607
  • 592
  • Please explain in detail what command you executed, how (exact arguments) and where (directory), as well as the error message you get on Code Blocks, and, if applicable, after executing `chown`. – Daniel Beck Aug 05 '12 at 13:28
  • i first changed directory to desktop by cd /home/raman/Desktop and then I ran the command chown raman.raman * . To make sure that I even did sudo chown raman.raman * . Where raman is the username – Emily Smith Aug 05 '12 at 13:32
  • Are the files you want to write on the Desktop? Have you tried the same with a colon? It should be `chown raman:raman` ... you also should make sure you have write permissions as well, e.g. `chmod u+rw` – Daniel Beck Aug 05 '12 at 13:33
  • No i havn't tried it with colon so should I use chown u+rw or chmod u+rw – Emily Smith Aug 05 '12 at 13:36
  • 1
    You should start by reading these commands' man pages, `man chmod` and `man chown`. Your description is still rather vague so it will not be easy for others to give you step by step instructions, and used wrongly, these commands can render your system unusable. So you really should read up on [unix filesystem permissions](http://en.wikipedia.org/wiki/File_system_permissions#Traditional_Unix_permissions). – Daniel Beck Aug 05 '12 at 13:38
  • thanks sir I followed your command chown raman:raman * .Now it doesn't give the error "cann't create obj/directory" but now it asks the main.c is not built , would you like to build it.On clicking yes nothing happens – Emily Smith Aug 05 '12 at 13:41

0 Answers0