[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linux Path



On Mon, Jun 11, 2012 at 05:23:56PM +0300, Jari Fredriksson wrote:
> On Mon, June 11, 2012 17:15, Ethan Rosenberg wrote:
> > Dear List -
> >
> > I have a deficiency in my knowledge of paths.
> >
> > Will you please help.
> >
> > My working directory is /var/www/Webpages2
> >
> > In that directory I have a file b.mp4.
> >
> > This file also is in /home/ethan/Gingy/Pictures/Vol_1
> >
> > If I access b.mp4 in /var/www/Webpages2,  [src="b.mp4"] the file is found.
> >
> > It is not found using the full path [src="
> > /home/ethan/Gingy/Pictures/Vol_1/b.mp4"] .
> >
> > Where is my error?
> >
> > Thanks.
> >
> > Ethan Rosenberg
> >
> 
> How do you access it? If with a web browser (as the folder /var/www
> suggests), it is not possible to access anything out of /var/www.
> 
> You can move the file to /home/ethan/public_html/Gingy/Pictures/Vol_1 and
> access it via http://server/~ethan/Gingy/Pictures/Vol_1/b.mp4

Assuming apache (a logical assumption here), indeed, only items in the
webroot (/var/www/* in your case) will be served.
However, you needn't necessarily move the file there.
You could also symlink it.
On one of my servers, I have a lot of stuff in a subdir of the /home for an extra user I created that is symlinked in /var/www, like
ln -s /var/www/somedir /home/dude/somedir
This I do because the / root partition has only 20gb, while my /home
partition has nearly the remainder of a 500gb hdd.

Just an option to consider.

Either way, you've got to either move the file to webroot (/var/www/)
or symlink it.

./tony
-- 
http://www.tonybaldwin.me
all tony, all the time!
3F330C6E

Attachment: signature.asc
Description: Digital signature


Reply to: