0

Edit: Now, I have managed to solve error 500 error.Now I receive a purely Drupal "File Not Found" for the private files that contained arabic characters in their file names. I have checked the file_managed table and If I change the filename for any of the mentioned files from anything in Arabic to anything in English, the error is gone. Does anybody know why would Drupal have a problem in handling private files with unicode (arabic) characters in their file names?

Thanks!

perpetual_dream
  • 1,046
  • 5
  • 18
  • 51
  • yes it could do with the contents of the `.htaccess` file but we are clairvoyant. No info, no specific answer. :-( – TerryE Feb 15 '12 at 17:27
  • sorry but it's way past my bedtime so I am turning in. Can I suggest that you edit your Q and add any pertinent details, test cases, etc. The more info that you give the better chance of a informed response. I will delete my answer since its not relevant, to knock the responses down to zero -- this might help with other responses :) – TerryE Feb 16 '12 at 01:47
  • put some info (`.htaccess` content,log file, ...). We have no skill in mind reading:-D – undone Feb 21 '12 at 13:04
  • why are you serving a private file? what is a "private" file? – Ярослав Рахматуллин Feb 21 '12 at 23:36

1 Answers1

0

Problem is probably that you are saving the file without setting permissions that would allow the web-server user to read it. I'm going to suggest a solution which ignores .httaccess entirely because you have not provided us with the contents of that file.

[BTW root user has the uid of 0. Who is user 1 and why would she be relevant?]

  1. find out "who" is running apache
  2. make sure "who" can read the file you cannot access

Assuming your web server is apache, this command will tell you which user is running apache:

 $ ps aux|grep apach[e] 
root     19874  1.0  0.6  84008 12736 ?        Ss   00:24   0:00 /usr/sbin/apache2 -D (...)
apache   19876  0.0  0.4  48576  8380 ?        S    00:24   0:00 /usr/sbin/apache2 -D (...)
(...)

The user apache is running the binary apache2 on my system. Ignore the first line which shows who started apache2. Now, make the file readable by apache.

$ chmod 644 /path/to/whereever/you/put/system/files/docFiles/nameoffile.pdf

now everyone can read the file and the owner may write to it.