summaryrefslogblamecommitdiffstats
path: root/satellit_installer/includes/90-set_directory_permissions.inc
blob: 3e84d39bd4ca8ba97a43bffc6e750e02b9b2fe58 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                                                           

                                                                            
 
                             


                                                              
 

                                                           
 
                                                                                 

                                                 
 
                           
                                    
 


                                                        
 
                                       
 
                                 

                                                                                  
 
# Here is the place to (recursively) set directory and/or file permissions.
# This is some kind of a stop gap to be sure permissions are set rightly,
# as sometimes eg. archives wield not the desired permissions.
# Also, place for some last ditch copying of files, es this is executed near
# the end of script execution.

set_directory_permissions() (
	mkdir -p "$OPENSLXDIR/configs/modules"
	chmod 755 "$OPENSLXDIR/configs"
	chown -R taskmanager:taskmanager "$OPENSLXDIR/configs"

	chmod 755 "$OPENSLXDIR/ipxe"
	chown -R taskmanager:taskmanager "$OPENSLXDIR/ipxe"

	# Keep care with $OPENSLXDIR, as $OPENSLXDIR/nfs needs other permissions.
	chmod 775 "$OPENSLXSRVDIR"
	chown -R dmsd:images "$OPENSLXSRVDIR/nfs"

	chmod 755 "$WWWDIR"
	chown -R root:root "$WWWDIR"

	mkdir -p "$WWWDIR/boot/download"
	chown -R taskmanager:www-data "$WWWDIR/boot"
	chmod 755 "$WWWDIR/boot" "$WWWDIR/boot/download"

	chown -R taskmanager "$TFTPDIR"

	mkdir -p "$SLXADMINCACHE"
	chmod 0755 "$SLXADMINCACHE"				# if already there
	chown -R www-data:www-data "$SLXADMINCACHE"
)