configurer un ftp sur drobo |
Bienvenue invité ( Connexion | Inscription )
configurer un ftp sur drobo |
12 Aug 2010, 21:26
Message
#1
|
|
Adepte de Macbidouille Groupe : Membres Messages : 76 Inscrit : 14 Oct 2008 Membre no 123 615 |
bonjour,
voila, j'ai acheté un Drobo avec un Drobo share qui fonctionne sous linux (quelle version, je ne sais pas) j'ai téléchargé et installé les apps dropbear pour avoir un acces SSH, ainsi que pure-ftpd. sur le forum Drobo, qui n'est malheureusement accessible qu'avec un numero de serie d'un des produits drobos, il y a quelqu'un qui a mis un tuto qui semble assez complet selon les autres utilisateurs, mais assez brouillon. voilà, je viens poster ici, parce que comme je l'ai dit plus haut, le forum n'est pas accessible, donc tres peu de reponses, or j'en ai besoin assez vite. mon probleme, est au niveau de la ligne que j'ai souligné en rouge, le terminal me renvoi la réponse suivante : nohup: appending output to 'nohup.out' nohup: cannot run command '/pure-ftpd': No such file or directory comment resoudre le probleme ? voici donc le post complet de mountainbiker : mountainbiker http://www.pureftpd.org/project/pure-ftpd and especially section "PER-USER CHROOT() RULES". [mac /] $ ssh [email protected] [email protected]'s password: giveit2me Welcome to Embedded Linux _ _ | ||_| | | _ ____ _ _ _ _ | || | _ \| | | |\ \/ / | || | | | | |_| |/ \ |_||_|_| |_|\____|\_/\_/ A Data Robotics Product. http://www.drobo.com/ /> BusyBox v1.1.2 (2007.06.18-15:03+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands. ~ $ rm ConnectedDrobos/ ~ $ addgroup ftpgroup ~ $ more /etc/group root:x:1:root user:x:500: ftpgroup:x:501: ~ $ adduser -h /root/ConnectedDrobos/./ -G ftpgroup ftpuser adduser: Failed to execute 'passwd', you must set the password for 'ftpuser' manually ~ $ more /etc/passwd root:$1$$J8Ji9LlFpF1EaoKKlkeGO/:0:0:root:/root:/bin/sh nobody:x:99:99:Nobody:/:/sbin/nologin user::500:500:Linux User,,,:/home/user:/bin/sh ftpuser:x:501:501:Linux User,,,:/root/ConnectedDrobos/./:/bin/sh ~ $ passwd ftpuser Changing password for ftpuser Enter the new password (minimum of 5, maximum of 8 characters) Please use a combination of upper and lower case letters and numbers. Enter new password: ftpuser Bad password: too simple. Warning: weak password (continuing). Re-enter new password: ftpuser Password changed. ~ $ cd /mnt/DroboShares/Drobo/DroboApps/pure-ftpd/ /mnt/DroboShares/Drobo/DroboApps/pure-ftpd $ ls auto_config nohup.out pure-ftpd-start.sh pure-ftpd.pid name pure-ftpd pure-ftpd-stop.sh /mnt/DroboShares/Drobo/DroboApps/pure-ftpd $ rm auto_config /mnt/DroboShares/Drobo/DroboApps/pure-ftpd $ ./pure-ftpd-start.sh unused /mnt/DroboShares/Drobo/ /mnt/DroboShares/Drobo/DroboApps/ /mnt/DroboShares/Drobo/Music/ /mnt/DroboShares/Drobo/Movies/ /mnt/DroboShares/Drobo/My Stuff/ /mnt/DroboShares/Drobo/DroboApps/pure-ftpd $ ./pure-ftpd-start.sh unused /mnt/DroboShares/Drobo/Music /mnt/DroboShares/Drobo/DroboApps/pure-ftpd /mnt/DroboShares/Drobo/Music /mnt/DroboShares/Drobo/DroboApps/pure-ftpd ~ $ Note on the pure-ftpd-start.sh parameters: 1 - is unused in the shell script 2 - mount directory this creates a symlink called ConnectedDrobos in the root directory of home that points to this mount directory 3 - pure-ftp application directory where pure-ftpd is located Open browser enter the URL: ftp://root:[email protected]/ or ftp://[email protected]/ (and be prompted for user/password) or ftp://ftpuser:[email protected]/ or ftp://[email protected]/ (and be prompted for user/password) Now close the FTP browser window. Set your router up to do port forwarding of your dynamic ip to your DroboShare (mine is at 10.0.1.199). If you don't know your dynamic IP, check http://whatismyip.com/. For this example, lets say mine is 123.456.789.123. Once you rebooted your router, you should be able to login again from the outside, e.g., ftp://[email protected]/ ####################################################### # Written by: mountainbiker (Drobo Forum) # Version: 20081122-1532 # Purpose: .profile for use on the DRI DroboShare # # Note: # Don't forget to mkdir $FTP/ftp # ####################################################### # Prompt # # Black 0;30 Dark Gray 1;30 # Blue 0;34 Light Blue 1;34 # Green 0;32 Light Green 1;32 # Cyan 0;36 Light Cyan 1;36 # Red 0;31 Light Red 1;31 # Purple 0;35 Light Purple 1;35 # Brown 0;33 Yellow 1;33 # Light Gray 0;37 White 1;37 # red='\e[0;31m' RED='\e[1;31m' # blue='\e[0;34m' BLUE='\e[1;34m' # cyan='\e[0;36m' # CYAN='\e[1;36m' # green='\e[0;32m' # GREEN='\e[1;32m' NC='\e[0m' #no color PS1="\n[\[${RED}\]\u\[${NC}\]@\[${RED}\]\h \[${BLUE}\]\w\[${NC}\]]\n\$ " # Environment Variables export PS1 export DROBO=/mnt/DroboShares/Drobo export TORRENT=$DROBO/DroboApps/ctorrent-dnh3.3.2/ctpackage export FTP=$DROBO/DroboApps/pure-ftpd export PROFILE=$HOME/.profile # Shell options set -o vi # won't set to on for me on the DroboShare; use "set -o" to check # Aliases alias c="clear" alias e="vi $PROFILE;l" alias l=". $PROFILE" # ... alias pureftp="cd $FTP" alias ll="ls -al" alias start_ftp="_ftp_prefix;./pure-ftpd-start.sh x $FTP/ftp $FTP;_ftp_postfix" alias start_music_ftp="_ftp_prefix;./pure-ftpd-start.sh x $DROBO/Music $FTP;_ftp_postfix" alias stop_ftp="$FTP/pure-ftpd-stop.sh" alias start_torrent="$TORRENT/ctorrent -D 200 -U 10 -E 1.5 $TORRENT/torrents/*.torrent" alias torrent="cd $TORRENT" alias ..="cd ..;" alias ....="cd ..;cd ..;" alias _ftp_prefix="rm /root/ConnectedDrobos/;rm $FTP/auto_config;cd $FTP" alias _ftp_postfix="cd - > /dev/null" [DroboShare ~] /$ more /etc/passwd root:$1$$J8Ji9LlFpF1EaoKKlkeGO/:0:0:root:/root:/bin/sh nobody:x:99:99:Nobody:/:/sbin/nologin user::500:500:Linux User,,,:/home/user:/bin/sh ftpuser:$1$$lEGWZx3wSut2Y0BtV6pzq1:501:501:Linux User,,,:/root/ConnectedDrobos/./:/bin/sh [DroboShare ~] $ more /etc/group root:x:1:root user:x:500: ftpgroup:x:501: [DroboShare ~] $ ls $FTP auto_config name pure-ftpd pure-ftpd-stop.sh ftp nohup.out pure-ftpd-start.sh pure-ftpd.pid [DroboShare ~] $ stop_ftp [DroboShare ~] $ start_ftp /mnt/DroboShares/Drobo/DroboApps/pure-ftpd/ftp /mnt/DroboShares/Drobo/DroboApps/pure-ftpd nohup: appending output to 'nohup.out' [DroboShare ~] $ ls -l .ash_history .profile ConnectedDrobos -> /mnt/DroboShares/Drobo/DroboApps/pure-ftpd/ftp DontPlaceFilesHere.txt Look at http://www.dyndns.com/ DynDNS URLs are set to the IP you set at setup (under the free service). Therefore, to ensure the named DynDNS URL works, you need to verify that it matches your dynamic IP provided by your ISP. You can check your IP quickly using http://whatismyip.com/ This function I use in my bash (not Droboshare) profile: function ip() { # Get IP adresses. IPWIRED=$(/sbin/ifconfig en0 | egrep -o 'inet [0-9.]+' | egrep -o '([0-9]{1,3}.){3}[0-9]{1,3}') MACWIRED=$(/sbin/ifconfig en0 | egrep -o 'ether [0-9a-f:]+' | egrep -o '([0-9a-f]{2}{5}[0-9a-f]{2}') IPWIFI=$(/sbin/ifconfig en1 | egrep -o 'inet [0-9.]+' | egrep -o '([0-9]{1,3}.){3}[0-9]{1,3}') MACWIFI=$(/sbin/ifconfig en1 | egrep -o 'ether [0-9a-f:]+' | egrep -o '([0-9a-f]{2}{5}[0-9a-f]{2}') IPWORLD=$(curl -s http://www.whatismyip.com/automation/n09230945.asp | egrep -o '([0-9]{1,3}.){3}[0-9]{1,3}') echo -e -n "${RED}Local (wired) :${NC} ${IPWIRED:-Not connected}\n" echo -e -n "${RED}MAC (wired) :${NC} ${MACWIRED:-Not connected}\n" echo -e -n "${RED}Local (WiFi) :${NC} ${IPWIFI:-Not connected}\n" echo -e -n "${RED}MAC (WiFi) :${NC} ${MACWIFI:-Not connected}\n" echo -e -n "${RED}ISP :${NC} ${IPWORLD:-Not connected}\n" } On your Mac side, make an entry like 10.0.1.199 droboshare into /etc/hosts. Note: 10.0.1.199 is the IP assigned by your router, so the IP maybe static or dynamic (DHCP). You'll then be able to use it to do shorthand things like ssh root@droboshare to SSH into the DroboShare http://droboshare:8080/ to access the DroboShare Admin Utility The router will need to do port mapping, which passes the “live” ISP IP address to your local IP address. These IPs could be dynamic or static. Typically, both are dynamic, but your router may assign the same dynamic local IP address to your DroboShare, unless you change your networks configuration. Note: 10.0.1.199 is the dynamic local IP address, which could potentially change; therefore, this will have to reflect any such change. |
|
|
Nous sommes le : 27th April 2024 - 01:49 |