XUpload - chmod'ding files once upload is finished

XUpload related questions

Moderator: admin

Message
Author
Alchemy

chmod'ding files once upload is finished

#1 Postby Alchemy » May 21, 2006 10:58 am

I'm a bit new to perl, but I know php, javascript and html ( tries to smile )

The uploader works wonderfully, by the way, but out of curiosity, is there a way to have it chmod the files uploaded to 0755 once they are moved from the temp dir to the final one? I've tried adding this line of code

chmod 0755,$dir/$fname;

after the last line of sub SaveFile2 in the upload.cgi file, but when I do that, the upload won't even start correctly.

the files on my server; once uploaded, are always uploaded in 0600 mode, and I don't quite understand why.

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#2 Postby PilgrimX182 » May 25, 2006 1:33 pm

Actually files CHMODding already in PRO2 code, that is releasing in 20 minutes today :)

You should just use that code in SaveFile function:

Code: Select all

my $mode = 0744;
chmod $mode,"$dir/$fname";


Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 0 guests