FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Permissions and Filelist question





Da Rossa
hi, What I wnat is really simple:
I created a directory called "dir" under my /public_html/. Inside, I put some text and pdf files, none of them are complying with webhosting standards, such as avoiding spaces, using _'s, no accents etc.

The goal is to make the dir accessible by typing my address in the browser, which is http://www.darossa.frih.net/dir/ <-- but this is returning the 403 error. I tried setting the permissions of both the directory and all the files inside to 777 then 755, none worked.

When the permission is corectly set, then I'd like my friends to see the file list inside, something like

Ciência Política quarta-feira 27-2-8.txt
Ciência Política sexta, 7 de março de 2008.txt
Ciência Política sexta-feira 29-2-08.txt
Plano de Ensino de Ciência Política - 1.pdf

...and be able to download them too. After everytihng is set, I'd like to point the links in my home page.

I'm using DirectAdmin.

thanks for attention!
SonLight
I believe a php script could be written which would do the job. Because of the issues with the file names, it may require special techniques. I ran an experiment with one of you filenames, and get the impression it failed miserably because my browser is using the wrong character encoding. I believe this is an interesting problem, well worth the effort of putting our heads together to better understand language encoding issues.

I tried to fetch the file:
Ciência Política quarta-feira 27-2-8.txt

by pasting it togther with the prefix to your site, and got the url:
http://www.darossa.frih.net/dir/Ciência%20Política%20quarta-feira%2027-2-8.txt
(note that the spaces were automatically fixed, so they're not a serious issue)

The requested URL /dir/Ciência PolÃtica quarta-feira 27-2-8.txt was not found on this server.

Since both the characters and the number of characters differ, I suspect incompatable encodings. I guessed ISO 8859-3, Southern European, might be the right encoding, and that the "not found" message would erroneously use 8859-1, the Western encoding. URL processing may always assume that, but it may be overridable with a php script.
Da Rossa
Now I'm scared! First of all, thanks for your answer!!
But I know nothing about char encoding, nothing at all... And all I was expecting was the folder to be accessible by the people, such as those "raw" sites in which you see a big "index of..." in the header and a filelist along the page. That's why I don't think the char encoding would be an issue...
SonLight
Sorry to be so slow responding in more detail. I was hoping someone who knows more about the subject, and particularly what is possible on frihost, would respond.

The explanation you gave of an automatic directory listing is a feature that can be enabled or disabled when a server is set up. On an ftp site, normally the directory listing is enabled. If you think using anonymous ftp is a good way of providing the files, you could try setting that up. Using the more common http, I'm not sure if you can allow some directories to be listed while excluding others. If you use the auto-list feature, my guess is that the filenames would all be handled automatically.

My first thought was that it would be better to use a php script, so you have exact control over how it works. A simple script can read the directory entries and convert them into links to the file. Unfortunately that course of action requires the greatest level of understanding of the details.

As a test, you may want to see if you can set up a simple html page and see if it can handle your file names correctly. I would suggest including at least one file with a simple English-letter-only name to help identify the source of any errors.

If you look at the source of an html page, you will commonly see a line something like:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

That line tells the server and the browser what kind of a page it is, including what character set the page uses. If you were to change the "charset=iso-8859-1" to "charset=iso-8859-3", you would be set up to handle most Southern European languages correctly. I would suggest trying to see if that displays the filenames properly and if it links to them correctly if you would like to know more about how to deal with character sets as well as how to get the files listed. If you post your results, I'm sure someone can help you deal with any issues.

Those of us who use mostly English never get much experience setting up character encodings, because any character encoding works ok for us. Another useful setting is "charset=utf-8" which works for nearly all languages at once, but there is a cost. The files may be larger, and editing of the html or php must be done with an editor operating in utf-8 mode.
Da Rossa
Quote:
If you look at the source of an html page, you will commonly see a line something like:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

No, none of my pages has this string...

And no, I have 0 understanding about php.... I hope to learn in the future...
I found a way to bypass this difficulty: I decided to type the notes in Word then paste in the design view of NVU, making, then, the last changesque Since it's simply about html without extra scripts, it's satisfactory.

Quote:
I would suggest trying to see if that displays the filenames properly and if it links to them correctly if you would like to know more about how to deal with character sets as well as how to get the files listed. If you post your results, I'm sure someone can help you deal with any issues.


I honestly appreciate your tip bro!!

Quote:
Those of us who use mostly English never get much experience setting up character encodings, because any character encoding works ok for us. Another useful setting is "charset=utf-8" which works for nearly all languages at once, but there is a cost. The files may be larger, and editing of the html or php must be done with an editor operating in utf-8 mode.
Good to know this particularity! Smile
Related topics
I Have a question . Is it the server support Chinese?
Question before requesting free hosting
question abt posts/mth
Kinda dumb question regarding DNS
cPanel permissions problem.
A question
UT2004 U like the game? Do u have any question post here.
Question about DNS!
Question about Domain!
another uni.cc question
Question
Can't change permissions? Could not change perms on images
Permissions on my root html directory
PHPBB Forum question
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.