Droopy: Make chmod optional.

Droopy always does the chmod operation, if the option is set.
On partitions with FAT it is not possible to execute this operation.
Droopy may ran into issue in that situation.

With that fix, the option won't be set on droopy start to prevent
any chmod operation on FAT partitions.

Fixes #154
This commit is contained in:
Matthias Strubel 2016-06-14 20:09:28 +02:00
parent 459dfa3e0d
commit 7950472e0e
5 changed files with 10 additions and 2 deletions

View file

@ -20,6 +20,7 @@ CHANGELOG
* [Changed] Send HTTP-Code 204 via PHP, much cleaner * [Changed] Send HTTP-Code 204 via PHP, much cleaner
* [Changed] Update jQuery to 2.2.3, removes IE <=8 support * [Changed] Update jQuery to 2.2.3, removes IE <=8 support
* [Changed] Redirect happens now always to wished domain name * [Changed] Redirect happens now always to wished domain name
* [Changed] Droopy, make chmod operation optional (prevent errors on OpenWRT)
* [Fix] License Adjustments * [Fix] License Adjustments
* [Fix] Prevent JS Injection in Shoutbox * [Fix] Prevent JS Injection in Shoutbox
* [Fix] Shoutbox: Missing blank between author and content * [Fix] Shoutbox: Missing blank between author and content

View file

@ -64,6 +64,7 @@ $(OPENWRT_CONFIG_FOLDER):
sed 's:DNSMASQ_INTERFACE="wlan0":DNSMASQ_INTERFACE="br-lan":' -i $@/piratebox.conf sed 's:DNSMASQ_INTERFACE="wlan0":DNSMASQ_INTERFACE="br-lan":' -i $@/piratebox.conf
sed 's:192.168.77:192.168.1:g' -i $@/piratebox.conf sed 's:192.168.77:192.168.1:g' -i $@/piratebox.conf
sed 's:DROOPY_USE_USER="yes":DROOPY_USE_USER="no":' -i $@/piratebox.conf sed 's:DROOPY_USE_USER="yes":DROOPY_USE_USER="no":' -i $@/piratebox.conf
sed 's:DROOPY_CHMOD:#DROOPY_CHMOD:' -i $@/piratebox.conf
sed 's:LEASE_FILE_LOCATION=$$PIRATEBOX_FOLDER/tmp/lease.file:LEASE_FILE_LOCATION=/tmp/lease.file:' -i $@/piratebox.conf sed 's:LEASE_FILE_LOCATION=$$PIRATEBOX_FOLDER/tmp/lease.file:LEASE_FILE_LOCATION=/tmp/lease.file:' -i $@/piratebox.conf
sed 's:TIMESAVE_FORMAT="":TIMESAVE_FORMAT="+%C%g%m%d%H%M":' -i $@/piratebox.conf sed 's:TIMESAVE_FORMAT="":TIMESAVE_FORMAT="+%C%g%m%d%H%M":' -i $@/piratebox.conf
sed 's:FIREWALL_FETCH_DNS="yes":FIREWALL_FETCH_DNS="no":' -i $@/firewall.conf sed 's:FIREWALL_FETCH_DNS="yes":FIREWALL_FETCH_DNS="no":' -i $@/firewall.conf

View file

@ -129,7 +129,9 @@ IMAGE="$PIRATEBOX_FOLDER/src/$IMAGENAME"
DROOPY_TXT="" DROOPY_TXT=""
DROOPY_PORT="8080" DROOPY_PORT="8080"
# Set correct permissions for an uploaded file # Set correct permissions for an uploaded file
# The following line needs to be commented for FAT32 / vfat partitions
DROOPY_CHMOD="755" DROOPY_CHMOD="755"
DROOPY_USERDIR="" DROOPY_USERDIR=""
# Uncomment line below for adding directory feature # Uncomment line below for adding directory feature
#DROOPY_USERDIR=" -u True " #DROOPY_USERDIR=" -u True "

View file

@ -173,7 +173,9 @@ case "$1" in
if [ "$DROOPY_USE_USER" = "yes" ] ; then if [ "$DROOPY_USE_USER" = "yes" ] ; then
DROOPY_USER=" -c $LIGHTTPD_USER:$LIGHTTPD_GROUP " DROOPY_USER=" -c $LIGHTTPD_USER:$LIGHTTPD_GROUP "
fi fi
start-stop-daemon $DROOPY_USER -m --start --background --pidfile $PIDFILE_DROOPY --exec $PIRATEBOX/bin/droopy -- -d "$UPLOADFOLDER" -m "$DROOPY_TXT" --chmod $DROOPY_CHMOD $DROOPY_USERDIR $DROOPY_PORT DROOPY_DO_CHMOD=""
test -n "$DROOPY_CHMOD" && DROOPY_DO_CHMOD="--chmod $DROOPY_CHMOD"
start-stop-daemon $DROOPY_USER -m --start --background --pidfile $PIDFILE_DROOPY --exec $PIRATEBOX/bin/droopy -- -d "$UPLOADFOLDER" -m "$DROOPY_TXT" $DROOPY_DO_CHMOD $DROOPY_USERDIR $DROOPY_PORT
log_end_msg $? log_end_msg $?
fi fi

View file

@ -167,7 +167,9 @@ case "$1" in
if [ "$DROOPY_USE_USER" = "yes" ] ; then if [ "$DROOPY_USE_USER" = "yes" ] ; then
DROOPY_USER=" -c $LIGHTTPD_USER:$LIGHTTPD_GROUP " DROOPY_USER=" -c $LIGHTTPD_USER:$LIGHTTPD_GROUP "
fi fi
start-stop-daemon $DROOPY_USER -m -S -b -p $PIDFILE_DROOPY -x $PIRATEBOX/bin/droopy -- -d "$UPLOADFOLDER" -m "$DROOPY_TXT" --chmod $DROOPY_CHMOD $DROOPY_USERDIR $DROOPY_PORT DROOPY_DO_CHMOD=""
test -n "$DROOPY_CHMOD" && DROOPY_DO_CHMOD="--chmod $DROOPY_CHMOD"
start-stop-daemon $DROOPY_USER -m -S -b -p $PIDFILE_DROOPY -x $PIRATEBOX/bin/droopy -- -d "$UPLOADFOLDER" -m "$DROOPY_TXT" $DROOPY_DO_CHMOD $DROOPY_USERDIR $DROOPY_PORT
echo $? echo $?
fi fi