Buy Now
Sign in

File Upload permissions

tshirley , October 10 2017

I want to upload a file and then read it back using a fopen and fread in Custom code. However the permissions are set to 644 on the uploaded file and I don't see any way to change them at the time of upload.

if i run is_readable on the file, i get false, so I expect that is my problem.

The fopen simply returns nothing. It isn't false, or anything else. just null.

Is there any way I can set permissions when the file uploads?


Hi Tim,

ChronoForms doesn't set file permissions as far as I am aware. You should be able to change them using a Custom Code action after the Upload Files action - see this StackOverflow answer.

NB The problem may be because (a) you have FTP enabled on the site, or (b) the Joomla! user does not have full write permissions (that's the server user not a registered user).

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
Hi Bob,

Thanks - turned out there was another error in my code as well, but the information (as always) is useful.

It's resolved.