Access FTP folder from the web server

Questions about HTTP Access/Mods may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.

Access FTP folder from the web server

Postby int15 » Thu Dec 14, 2006 12:15 am

Hi,

Is it possible to access a folder at the same level as the web folder from a directory under web?

For example:

A) In /volume1/web/stream.php : I have some PHP files.
B) In /volume1/mp3 : I have (guess what) mp3 files.

Would it be possible for "stream.php" to access the "mp3" folder? Right now, I have to duplicate the mp3 files in both /volume1/web/stream and /volume1/mp3.

Thanks,
-Int15
Synology Model: DS-101j
Firmware Version: 2.0.3 - 0640
User avatar
int15
Student
Student
 
Posts: 66
Joined: Mon Dec 04, 2006 12:01 am

Postby SoLan » Thu Dec 14, 2006 12:38 am

To my knowledge, this is currently not possible (unless you modify/hack your DiskStation (and thereby void warranty and support) to access the web server configuration file). Only files in the /volume1/web directory can be accessed by the web server.

--SoLan
DiskStation DS-106e (2.0 - 0640) :: Samsung SpinPoint P120 SP2004C
SoLan
Versed
Versed
 
Posts: 284
Joined: Thu Oct 26, 2006 1:37 pm

Postby int15 » Thu Dec 14, 2006 1:24 am

Fair enough. Can we move the thread to the Mod Lounge?

Thanks,
-Int15
Synology Model: DS-101j
Firmware Version: 2.0.3 - 0640
User avatar
int15
Student
Student
 
Posts: 66
Joined: Mon Dec 04, 2006 12:01 am

Postby Franklin » Thu Dec 14, 2006 1:55 am

Done
**Franklin is not available**
**Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!**
Library ~ SynologyWiki ~ Synology FAQ ~ Compatibility Lists
Forum Links ~ Forum Policy ~ 3rd-party forums ~ Help us help you ~ Posting Images
Demo Links ~ DSM GUI ~ Photo Station
Downloads ~ Firmware Downloads ~ Beta Program
Support ~ Support Form ~ Submit Kernel ~ Synology eNews
User avatar
Franklin
Synology Inc
Synology Inc
 
Posts: 6649
Joined: Sat Oct 14, 2006 11:33 pm
Location: Washington, USA

Re: Access FTP folder from the web server

Postby hjogi » Thu Dec 14, 2006 12:08 pm

int15 wrote:Hi,

Is it possible to access a folder at the same level as the web folder from a directory under web?

For example:

A) In /volume1/web/stream.php : I have some PHP files.
B) In /volume1/mp3 : I have (guess what) mp3 files.

Would it be possible for "stream.php" to access the "mp3" folder? Right now, I have to duplicate the mp3 files in both /volume1/web/stream and /volume1/mp3.

Thanks,
-Int15



I think that you could modify your apache configuration and add another directory or virtual host so you could access it by a web explorer like this.

anyway you have to enable telnet support!
Synology Disk Station DS-106e
Firmware 2.0.3 - 0417
User avatar
hjogi
Rookie
Rookie
 
Posts: 31
Joined: Wed Oct 25, 2006 8:24 am

Postby int15 » Thu Dec 14, 2006 5:35 pm

Thanks for the tip.

-Int15
Synology Model: DS-101j
Firmware Version: 2.0.3 - 0640
User avatar
int15
Student
Student
 
Posts: 66
Joined: Mon Dec 04, 2006 12:01 am

Postby int15 » Fri Dec 15, 2006 4:38 pm

I finally got it to work, using the "mount" command.

Got the info from this link.

Thanks,
-Int15
Synology Model: DS-101j
Firmware Version: 2.0.3 - 0640
User avatar
int15
Student
Student
 
Posts: 66
Joined: Mon Dec 04, 2006 12:01 am

Re: Access FTP folder from the web server

Postby kromega » Wed Jan 05, 2011 4:57 pm

Hi,
How do I FTP "under" down to the root ?
I want to back up my Squeeze config that is here : volume1/@appstore/SqueezeCenter/prefs/

But FTP as admin don't let me go up there, and I can't save files via telnet...

Thanks

Fabien
kromega
Trainee
Trainee
 
Posts: 14
Joined: Sun Mar 14, 2010 3:23 pm

Re: Access FTP folder from the web server

Postby AlleyKat » Tue Jan 11, 2011 7:50 am

I don't know how to do this with ordinary FTP, but you can access the entire file system by using SFTP (SSH FTP). I access this from my TotalCommander (with the SFTP plugin) which I always have with me on a stick. There are other clients which can do this, like FileZilla and SCP.
Last edited by AlleyKat on Tue Jan 11, 2011 12:52 pm, edited 1 time in total.
DS212+ [DSM 4.2 b2302]
Putty for SSH CLI. Must-have nerd hack stuff like ipkg, man, mc and wget-ssl.
Awesome custom AWStats 7.0, custom phpMyAdmin & more.
Running small, hobby websites on it, and some services enabled.

In short, cool device. You need one of these.
User avatar
AlleyKat
Experienced
Experienced
 
Posts: 108
Joined: Mon Mar 22, 2010 5:40 am
Location: Odense, Denmark

Re: Access FTP folder from the web server

Postby kromega » Tue Jan 11, 2011 8:56 am

Do you connect as root or admin ?
And what's the default folder you land in ?
kromega
Trainee
Trainee
 
Posts: 14
Joined: Sun Mar 14, 2010 3:23 pm

Re: Access FTP folder from the web server

Postby AlleyKat » Tue Jan 11, 2011 12:07 pm

root, and I end up in /root (/~)
DS212+ [DSM 4.2 b2302]
Putty for SSH CLI. Must-have nerd hack stuff like ipkg, man, mc and wget-ssl.
Awesome custom AWStats 7.0, custom phpMyAdmin & more.
Running small, hobby websites on it, and some services enabled.

In short, cool device. You need one of these.
User avatar
AlleyKat
Experienced
Experienced
 
Posts: 108
Joined: Mon Mar 22, 2010 5:40 am
Location: Odense, Denmark

Re: Access FTP folder from the web server

Postby kromega » Tue Jan 11, 2011 12:14 pm

Interesting.
Can you try from DOS for me see if ftp and sftp behave differently ?

I don't have access to root

Connected to 192.168.2.17.
220 myDiskStation FTP server ready.
User (192.168.2.17:(none)): root
530 User root access denied.
Login failed.
ftp>

Fabien
kromega
Trainee
Trainee
 
Posts: 14
Joined: Sun Mar 14, 2010 3:23 pm

Re: Access FTP folder from the web server

Postby AlleyKat » Tue Jan 11, 2011 12:49 pm

SFTP is not FTP. http://en.wikipedia.org/wiki/File_Trans ... tocol#SFTP :)

If your goal is to access the folder/file from the web server, you must add the folder path to the open_basedir path list. Then you can pull the file with a PHP script. This can be set in DSM control panel under Web services > PHP settings.
DS212+ [DSM 4.2 b2302]
Putty for SSH CLI. Must-have nerd hack stuff like ipkg, man, mc and wget-ssl.
Awesome custom AWStats 7.0, custom phpMyAdmin & more.
Running small, hobby websites on it, and some services enabled.

In short, cool device. You need one of these.
User avatar
AlleyKat
Experienced
Experienced
 
Posts: 108
Joined: Mon Mar 22, 2010 5:40 am
Location: Odense, Denmark

Re: Access FTP folder from the web server

Postby kromega » Tue Jan 11, 2011 1:08 pm

My goal is to access the files under volume1/@app for example, from a FTP client.

I've tried SFTP as server type on FileZilla, but no success

Status: Connecting to 192.168.2.17...
Response: fzSftp started
Command: open "root@192.168.2.17" 22
Command: Pass: ********
Status: Connected to 192.168.2.17
Error: Connection closed by server with exitcode 2
Error: Could not connect to server

Do I have to change anything on the Syno config ?
kromega
Trainee
Trainee
 
Posts: 14
Joined: Sun Mar 14, 2010 3:23 pm

Re: Access FTP folder from the web server

Postby AlleyKat » Tue Jan 11, 2011 1:24 pm

DS212+ [DSM 4.2 b2302]
Putty for SSH CLI. Must-have nerd hack stuff like ipkg, man, mc and wget-ssl.
Awesome custom AWStats 7.0, custom phpMyAdmin & more.
Running small, hobby websites on it, and some services enabled.

In short, cool device. You need one of these.
User avatar
AlleyKat
Experienced
Experienced
 
Posts: 108
Joined: Mon Mar 22, 2010 5:40 am
Location: Odense, Denmark

Next

Return to HTTP/Apache Mods

Who is online

Users browsing this forum: No registered users and 0 guests