Quantcast
Channel: PirateBox Forum - Raspberry Pi(rate)Box
Viewing all articles
Browse latest Browse all 1863

Re: [Urgent]How to change PirateBox Shared Folder to USB by default

$
0
0
Hi
File System of My USB Stick is FAT32
My USB stick is automunted by the tool usbmount I installed it by the following command and now my USB is automounted to /media/usb0
sudo apt-get install usbmount

My Piratebox is Configured at /opt/piratebox and my contents are at /opt/piratebox/share/Shared/
I need to change the Shared folder to USB so initially I tried to symlink with the following command
sudo ln -s /opt/piratebox/share/Shared /media/usb0/Shared
but still I am not getting the expected result and my droopy server fails for file uploading.
then I tried with changing the Share folder path in /opt/piraterbox/conf/piratebox.xonf
SHARE_FOLDER="$PIRATEBOX_FOLDER/share
changed it to
SHARE_FOLDER="/media/usb0/share/Shared"
still I was not able to achieve the expected result and droopy file uploading failed

------------------------------------
output of commands
pi@raspberrypi ~ $ mount
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=215824k,nr_inodes=53956,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=44820k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /media/usb0 type vfat (rw,nodev,noexec,noatime,nodiratime,sync,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=89620k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/mmcblk0p5 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

pi@raspberrypi ~ $ ls -l /opt/piratebox/
total 36
drwxr-xr-x 3 root   root    4096 May 12 07:18 bin
drwxr-xr-x 3 root   root    4096 May 12 07:19 conf
drwxr-xr-x 2 root   root    4096 May 12 07:18 init.d
drwxr-xr-x 2 root   root    4096 May 12 07:20 python_lib
drwxr-xr-x 5 nobody nogroup 4096 May 12 07:19 share
drwxr-xr-x 2 root   root    4096 May 12 07:18 src
drwxr-xr-x 2 nobody nogroup 4096 May 12 13:17 tmp
-rw-r--r-- 1 root   root      18 May 12 07:18 version
drwxr-xr-x 4 nobody nogroup 4096 May 12 09:10 www

pi@raspberrypi ~ $ ls -l /opt/piratebox/share
total 20
drwxr-xr-x 2 nobody nogroup 4096 May 12 07:19 board
-rwxr-xr-x 1 root   root    4318 May 12 07:19 index.html
drwxrwxrwx 5 nobody nogroup 4096 May 12 11:10 Shared
drwxr-xr-x 2 nobody nogroup 4096 May 12 07:19 tmp

pi@raspberrypi ~ $ ls -l /opt/piratebox/www
total 208
-rw-r--r-- 1 root   root     1236 May 12 09:07 AppAddaIcon.png
-rw-r--r-- 1 root   root    23186 May 12 09:08 Appadda.png
lrwxrwxrwx 1 root   root       26 May 12 07:19 board -> /opt/piratebox/share/board
drwxr-xr-x 2 nobody nogroup  4096 May 12 07:19 cgi-bin
-rw-r--r-- 1 nobody nogroup   637 May 12 13:17 chat_content.html
-rwxr-xr-x 1 nobody nogroup  1518 May 12 07:18 chat.html
-rwxr-xr-x 1 root   root        0 May 12 09:10 CheckCoupon.html
-rwxr-xr-x 1 nobody nogroup  1406 May 12 07:18 favicon.ico
-rwxr-xr-x 1 nobody nogroup   172 May 12 07:18 forum.html
-rw-r--r-- 1 root   root     4886 May 12 09:07 index.html
-rw-r--r-- 1 nobody nogroup 94840 May 12 07:18 jquery.min.js
drwxr-xr-x 3 nobody nogroup  4096 May 12 07:18 library
-rw-r--r-- 1 nobody nogroup    15 May 12 07:18 ncsi.txt
-rwxr-xr-x 1 nobody nogroup 16453 May 12 07:18 piratebox-logo.png
-rwxr-xr-x 1 nobody nogroup 12637 May 12 07:18 piratebox-logo-small.png
-rwxr-xr-x 1 nobody nogroup   200 May 12 09:25 redirect.html
lrwxrwxrwx 1 root   root       27 May 12 07:19 Shared -> /opt/piratebox/share/Shared
-rw-r--r-- 1 root   root      122 May 12 13:38 station_cnt.txt
-rwxr-xr-x 1 nobody nogroup   298 May 12 07:18 style.css


pi@raspberrypi ~ $ grep DROOPY /opt/piratebox/conf/piratebox.conf
DROOPY_ENABLED="yes"
DROOPY_TXT=""
DROOPY_PORT="8080"
DROOPY_USERDIR=""
#DROOPY_USERDIR=" -u True "
DROOPY_USE_USER="yes"

pi@raspberrypi ~ $ grep FOLDER /opt/piratebox/conf/piratebox.conf
PIRATEBOX_FOLDER="/opt/piratebox"
WWW_FOLDER="/opt/piratebox/www"
PIRATEBOX_PYTHONPATH="$PIRATEBOX_FOLDER/python_lib"
#SHARE_FOLDER="/media/usb0/share/Shared"
SHARE_FOLDER="$PIRATEBOX_FOLDER/share"
# UPLOADFOLDER="$SHARE_FOLDER/Upload"
UPLOADFOLDER="$SHARE_FOLDER/Shared"
 . $PIRATEBOX_FOLDER/conf/ipv6.conf
IMAGE="$PIRATEBOX_FOLDER/src/$IMAGENAME"
CHATFILE="$WWW_FOLDER/cgi-bin/data.pso"
GEN_CHATFILE="$WWW_FOLDER/chat_content.html"
.  $PIRATEBOX_FOLDER/conf/hook_custom.conf

pi@raspberrypi ~ $ grep LIGHTTPD /opt/piratebox/conf/piratebox.conf
LIGHTTPD_USER=nobody
LIGHTTPD_GROUP=nogroup

Thanks for quick response, and I hope some trick will work for me.

Viewing all articles
Browse latest Browse all 1863

Trending Articles