PDA

View Full Version : make error



rupeshkp728
May 30th, 2012, 11:52 AM
I have written a simple kernel module with only init and exit modules.
When I fire make command I get the following error:



make -C /usr/src/linux-2.6.32 SUBDIRS=/home/LDD/LDD_Practice modules
make[1]: Entering directory `/usr/src/linux-2.6.32'


/bin/sh: cannot create /home/LDD/LDD_Practice/.tmp_versions/ldd1.mod: Permission denied

make[2]: *** [/home/LDD/LDD_Practice/ldd1.o] Error 2
make[1]: *** [_module_/home/LDD/LDD_Practice] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.32'
make: *** [default] Error 2


What might be the cause of it and how to resolve it?
FYI I have the root permissions.

kc1di
May 30th, 2012, 11:56 AM
I have written a simple kernel module with only init and exit modules.
When I fire make command I get the following error:



make -C /usr/src/linux-2.6.32 SUBDIRS=/home/LDD/LDD_Practice modules
make[1]: Entering directory `/usr/src/linux-2.6.32'


/bin/sh: cannot create /home/LDD/LDD_Practice/.tmp_versions/ldd1.mod: Permission denied

make[2]: *** [/home/LDD/LDD_Practice/ldd1.o] Error 2
make[1]: *** [_module_/home/LDD/LDD_Practice] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.32'
make: *** [default] Error 2


What might be the cause of it and how to resolve it?
FYI I have the root permissions.
Who own the Home Directory? it's not allowing make to create a file in that directory.

rupeshkp728
May 30th, 2012, 12:28 PM
Thanks kc1di for the reply.

I am able to create the folders and files in home manually through command or explorer as my user has root permissions.
I have created folder like LDD, LDD_Practice etc. and have files in them.

Is it that make is getting restricted?

Bachstelze
May 30th, 2012, 02:44 PM
I am able to create the folders and files in home manually through command or explorer as my user has root permissions.


What have you done? Only root should have "root permissions".

kc1di
May 30th, 2012, 02:48 PM
Thanks kc1di for the reply.

I am able to create the folders and files in home manually through command or explorer as my user has root permissions.
I have created folder like LDD, LDD_Practice etc. and have files in them.

Is it that make is getting restricted?
you may have to give permissions for make to be able to write to the folders. go to the folder right click on it scroll to properties and then to the permissions tab you will most likely find that under group admin is not included with write abilities.
hope that helps.

Bachstelze
May 30th, 2012, 02:57 PM
you may have to give permissions for make to be able to write to the folders. go to the folder right click on it scroll to properties and then to the permissions tab you will most likely find that under group admin is not included with write abilities.
hope that helps.

No, no, no, no, no. There should be no need to change any permission. If you need to, you are doing something wrong.