PDA

View Full Version : .rar file forbidden


involutaryhaxor
August 26th, 2006, 12:09 PM
I have an archive that is called music.rar that I am putting on an Apache2 webserver for someone to download. For some reason unknown to me, he gets a 403 when he tries to access it. I also get the same error when trying to access it.
To give you a little bit more info about it:
It was created by winrar and was put onto the server using samba. It is also a little under 5 gig in size.
I have chmod 777'd it to no success, i have moved it to other directories, chmod'd it there too to no success.
And i have also tried changing the file extension.
Help please:(

Woei
August 26th, 2006, 02:51 PM
I have an archive that is called music.rar that I am putting on an Apache2 webserver for someone to download. For some reason unknown to me, he gets a 403 when he tries to access it. I also get the same error when trying to access it.
To give you a little bit more info about it:
It was created by winrar and was put onto the server using samba. It is also a little under 5 gig in size.
I have chmod 777'd it to no success, i have moved it to other directories, chmod'd it there too to no success.
And i have also tried changing the file extension.
Help please:(

Your permissions are fine, it's the size that's causing the problem. You see, on 32-bit systems, the maximum file size Apache can serve is ~2Gb. Anything larger will result in a 403 error message, which is confusing, as that would normally indicate a permission problem.

Now, HTTP isn't designed to handle filesizes that big. You'd better serve that file over something like sftp or a plain old ftp server. Note that some FTP servers also can't deal with files larger than 2Gb on 32 bit systems, although that should be the exception rather than the rule these days.

My advice ? Split the file up in sizable chunks. You'd rather not want your peer having to redownload the file due to some minor corruption on such an errorprone format like RAR. How you split it up is a matter of implementation. The standard Unix utility is 'split', although your peer is probably running Windows instead of Unix. In the Windows scene, the program HJSplit is pretty common to split large files. There's also a commandline program for Linux called lxsplit, which you can download (http://www.freebyte.com/hjsplit/#linux) and compile from source, after you've done an apt-get install build-essentials.

Then, you split the large rar file up in chunks of 1Gb or so, which will not result in a 403 error.

involutaryhaxor
August 26th, 2006, 03:08 PM
thankyou!