Quadcore
Occasional Visitor
I am an owner of RT-AC86U router with last stable release of RMerlin (384.4.2).
I've an external USB3 HDD with two partitions, first one with NTFS fs, second one with EXT3 fs.
I've installed the Entware packages (32bit) with the newest script and I've installed the same packages I had with my previous router (RT-AC56U) - with my previous router I had firmware Tomato.
The strange behavior is whenever the USB HDD is mounted. Even if in Entware installation I've used commands "chmod" and "chown" to give the proper permissions to some folders/files, after EXT3 partition mounting I've discovered that ALL folders and files have cancelled all my previous "chmod/chown" commands.
This is caused by script "app_base_link.sh", placed in folder "/usr/sbin". This is the code that cancels all my previous "chmod/chown" commands on folders/files - lines 63-78:
The issue is inside the "if" condition, the code uses "chmod -R 777" starting at root of the Entware's installation path. The same job is done with command "chown", using "admin:root" for all folders/files.
Logically the Entware partition is not of type "fuseblk", it is "ext3", so the "if" condition is always true.
I kindly ask to @RMerlin if it is possible to remove the two lines "chmod" and "chown", leaving the rest of the code, in order to keep the current "chmod/chown" status of all folders/files of Entware installation. Thanks.
Code is here "https://github.com/RMerl/asuswrt-me.../src/router/rom/apps_scripts/app_base_link.sh" and also on ASUSWRT gpl code "asuswrt\release\src\router\rom\apps_scripts".
I've an external USB3 HDD with two partitions, first one with NTFS fs, second one with EXT3 fs.
I've installed the Entware packages (32bit) with the newest script and I've installed the same packages I had with my previous router (RT-AC56U) - with my previous router I had firmware Tomato.
The strange behavior is whenever the USB HDD is mounted. Even if in Entware installation I've used commands "chmod" and "chown" to give the proper permissions to some folders/files, after EXT3 partition mounting I've discovered that ALL folders and files have cancelled all my previous "chmod/chown" commands.
This is caused by script "app_base_link.sh", placed in folder "/usr/sbin". This is the code that cancels all my previous "chmod/chown" commands on folders/files - lines 63-78:
Code:
APPS_MOUNTED_TYPE=`mount |grep "/dev/$APPS_DEV on " |awk '{print $5}'`
if [ "$APPS_MOUNTED_TYPE" != "vfat" ] && [ "$APPS_MOUNTED_TYPE" != "tfat" ]; then
if [ "$APP_FS_TYPE" != "fuseblk" ] ; then
chmod -R 777 $APPS_INSTALL_PATH
fi
user_account=`nvram get http_username`
if [ -z "$user_account" ]; then
user_account="admin"
fi
if [ "$APP_FS_TYPE" != "fuseblk" ] ; then
chown -R "$user_account":root $APPS_INSTALL_PATH
fi
rm -rf $APP_LINK_DIR
ln -sf $APPS_INSTALL_PATH $APP_LINK_DIR
exit 0
fi
Logically the Entware partition is not of type "fuseblk", it is "ext3", so the "if" condition is always true.
I kindly ask to @RMerlin if it is possible to remove the two lines "chmod" and "chown", leaving the rest of the code, in order to keep the current "chmod/chown" status of all folders/files of Entware installation. Thanks.
Code is here "https://github.com/RMerl/asuswrt-me.../src/router/rom/apps_scripts/app_base_link.sh" and also on ASUSWRT gpl code "asuswrt\release\src\router\rom\apps_scripts".