Where to set permissions to data subdirectories?

Hello,

I'm having problem with File upload plugin.

There is /data/ directory to save all uploaded data. So when I upload a file in /data/ directory is created subdirectories for example: /home/username/public_html/data/2011/02/21/103

And these directories are created with chmod 600 permissions, which means that FIle plugin can't upload files in destination directory.

If I manually connect by FTP and set 755 permissions on these subdirectories I'm able to upload files. But of course other user subdirecotory will be different and he won't be able to upload files..

Where I can find code line where File upload plugins creates directories and subdirectories for uploaded files?
I think I could use command chmod($pathtodirectory, 0755). But somehow I need to findout where I can add this line.
I think it shoule be somehwhere in /mod/file/actions/upload.php or any other file?
Can anyone help me?

 

Thanks.

  • I'm having file upload problems also. I think mine are a bit different than yours, But I suspect /mod/file/actions/upload.php is the culprit to.

  • I looked at my /data/2011/ and its chmod to 700. uploads work fine for me, except for mp3's.

  • Still searching. So I think I should edit engine/lib/filestore.php file. There is a lot functions. But still can't find where to add chmod().. And my mistake in first post. Directory is created with 644 permissions, but still it's not good bacause files is not stored in subdirectory. Directories permissions should be 755