Reputation: 1036
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!
Upvotes: 0
Views: 433
Reputation: 7921
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?]
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.
Upvotes: 0