[bf1942] Demo creation mode

Anton Jansen gradius at fmf.nl
Thu Jun 23 06:58:05 EDT 2005

Sebastian Kleye wrote:

> Hi,
> Andreas or anybody who knows. The autorecord function is creating the 
> demo files with 600 on the linux server. I have to say that I use it 
> in the public_html folder of the user I run bf2 from for these demos. 
> So when the server creates its demos and moves it to the public_html 
> folder, it still has the 600 mode and nobody "from  outside" can 
> access the files via web or battlerecorder unless I do a chmod on 
> these files...
> /Sebastian

Hi Sebastiaan,

A couple of quick fixes I can think off:

1. Change the umask of your bf2 user to 000
2. If that doesn't help, edit the file adminutils/demo/rotate_demo.py. 
Locate the line:

shutil.move(path, target_demo_dir)

Add before this line (be sure to have the SAME identation):
os.chmod(path, S_IREAD)

On the top of file, add the import for the stat module, which contains 
the S_IREAD value) by adding this line after the line having "import 
import stat

With kind regards,

Anton Jansen

More information about the Bf1942 mailing list