LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sim link question (https://www.linuxquestions.org/questions/linux-newbie-8/sim-link-question-4175534813/)

battles 02-22-2015 05:43 PM

Sim link question
 
Does it make any difference where a simlink is performed? Will a simlink be global when done in root or /root? Will the simlink be recognized by all users when done in root or /root?

Thanks.

Keith Hedger 02-22-2015 06:13 PM

In linux a symlink is a file system thing unlike windows links that are a os thing, so the symlink is basically a file like any other, it is visible to any one who has permisions to view it and usable by anyone who has the relevent permissions of the target file, so for instance if ( as root) you make a symlink from say /root/afile.txt to /tmp/link.txt, users will be able to see the link file in /tmp but without root permissions would not normally be able to acces the target file /root/afile.txt because only root would have permissions to view the contents of the /root folder and the file /root/afile.txt.

Also be aware of some confusing terms there is the 'root' folder of a system '/' afolder called '/root' which is tthe home fplder of the user called 'root'

battles 02-22-2015 08:26 PM

I think I understand the root system, but I don't really know how to correctly put it in word.

Let me further explain my problem. I have a user that uses some .h files that are in /usr/local/ssl/include/openssl/. One example is /usr/local/ssl/include/openssl/crypto.h. Within crypto.h are references to other .h files, such as this line: #include <openssl/opensslv.h>. If you try to use crypto.h, it will not be able to find opensslv.h because it is located in usr/local/ssl/include/openssl/ also and the compile will fail. There were instructions to do a simlink to remedy this problem: 'sudo ln -s /usr/local/ssl/include/openssl openssl'. This simlink didn't solve the problem however. I was thinking that maybe I had to do the simlink from within a specific user or folder. Any insight on this?

jpollard 02-22-2015 08:43 PM

That isn't a symlink issue.

The compilers all have a -I option to specify where directories containing include files reside.

In the case of <openssl/opensslv.h> where it resides in /usr/local/ssl/include, you would specify -I /usr/local/ssl/include to the compiler.

After that the compiler will append the path specified to access the opensslv.h file.

Since this is something usually handled within a Makefile, usually with a variable (INCLUDES is what is used a lot). If you are building another source code kit, usually there is a .configure script that comes with it, and you can usually specify the path to the .configure when it attempts to validate the environement - and will pass to the specification on to the creation of Makefiles...

battles 02-23-2015 08:24 AM

Thanks. I'll have to look into the compile suggestions. Apparently the symlink was bogus.


All times are GMT -5. The time now is 01:48 PM.