Skip to content

Commit 6035176

Browse files
committed
Change permission to root before create a deb package.
1 parent ae074a7 commit 6035176

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/hst_autocompile.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ if [ "$NGINX_B" = true ] ; then
155155
# copy binary
156156
cp usr/local/hestia/nginx/sbin/nginx usr/local/hestia/nginx/sbin/hestia-nginx
157157

158-
# build the package
159-
cd /usr/src
158+
# change permission and build the package
159+
cd $BUILD_DIR
160+
chown -R root:root hestia-nginx_$HESTIA_V
160161
dpkg-deb --build hestia-nginx_$HESTIA_V
161162

162163
# clear up the source folder
@@ -228,8 +229,9 @@ if [ "$PHP_B" = true ] ; then
228229
# copy binary
229230
cp usr/local/hestia/php/sbin/php-fpm usr/local/hestia/php/sbin/hestia-php
230231

231-
# build the package
232-
cd /usr/src
232+
# change permission and build the package
233+
cd $BUILD_DIR
234+
chown -R root:root hestia-php_$HESTIA_V
233235
dpkg-deb --build hestia-php_$HESTIA_V
234236

235237
# clear up the source folder
@@ -281,8 +283,9 @@ if [ "$HESTIA_B" = true ] ; then
281283
cd ../hestia_$HESTIA_V/usr/local/hestia/bin
282284
chmod +x *
283285

284-
# build the package
285-
cd /usr/src
286+
# change permission and build the package
287+
cd $BUILD_DIR
288+
chown -R root:root hestia_$HESTIA_V
286289
dpkg-deb --build hestia_$HESTIA_V
287290

288291
# clear up the source folder

0 commit comments

Comments
 (0)