chmod

Copy file permissions with chmod –reference

If you file you need to set permissions on and there is another file that already has the desired permissions, use the –reference switch with chmod.

chmod –reference <reference file> <target file>

Example:  Say eDirectory is not starting or even cores on startup.  Taking a strace points to a library.  You see symbolic link for libldapsdk.so is missing.  libldapsdk.so.0 is there.

You can quickly create the symbolic link with the ln -s command

ln -s libldapsdk.so.0.0.0 libldapsdk.so

The permissions now need to be set.  For this library it is simple, chmod 777, but some say you are not good with chmod or the permissions are a little different.  The easy way to do set the files is copy from another library link.

chmod –reference libldapsdk.so.0 libldapskd.so

Categories