lwinkenb
asked on
automake change permissions
How can I set the permissions of the files that get installed with
make install ?
basically, there are two files that get installed that I want to chmod to 700 instead of the default 755. Is there a change I can make to the Makefile.am file which does this?
make install ?
basically, there are two files that get installed that I want to chmod to 700 instead of the default 755. Is there a change I can make to the Makefile.am file which does this?
Modify you Makefile.in that creates the Makefile.am file...
change this line...
INSTALL_PROGRAM = @INSTALL_PROGRAM@
to
INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 700
change this line...
INSTALL_PROGRAM = @INSTALL_PROGRAM@
to
INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 700
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry for the late accept.
I think you should be able to control it using your umask setting
umask [-p] [-S] [mode]
The user file-creation mask is set to mode. If mode begins with a digit, it is interpreted as an octal number; otherwise it is interpreted as a symbolic mode mask similar to that accepted by chmod(1). If mode is omitted, the current value of the mask is printed. The -S option causes the mask to be printed in symbolic form; the default output is an octal number. If the -p option is supplied, and mode is omitted, the output is in a form that may be reused as input. The return status is 0 if the mode was successfully changed or if no mode argument was supplied, and false otherwise.
umask 077 should help
Sunnycoder