mwnci Posted February 24, 2010 Posted February 24, 2010 I've got a problem with the moodle smb web client module. I get a list of all of the documents in the relevant folder, but when I download any file via the moodle block, the file size is always 0 bytes, and as such I cannot read or open any of my files. I am running Moodle 1.9.7. Has anyone got this module working on 1.9.7? Anyone having similar issues? Cheers
RTFM Posted February 24, 2010 Posted February 24, 2010 We are having similar issues, I think it is a problem with that module specifically. We haven't had the time however to look into fixing the problem!!
kieran8055 Posted February 24, 2010 Posted February 24, 2010 Well the problem is with folder downoad for us in IE and it is okay in Mozilla Fire fox. Check with different browsers and see if its working.
mwnci Posted February 24, 2010 Author Posted February 24, 2010 Thanks for that - well I have tried in both IE8 and Firefox 3.6 and the problem occurs in both cases. I am able to upload a file successfully - and when I browse via windows explorer on my pc, the file is there and works, but I still cannot then view this new file via the module. It is listed, but when downloaded, has a file size of 0 bytes...
Achandler Posted February 25, 2010 Posted February 25, 2010 I have found that on our Ubuntu box we had the same issue. Having read multiple threads and posts from everywhere around the web I found a work around which is not ideal but does work. The solution was to create a temporary area on the webserver which the smbclient block can use to write files to before allowing you to download them. Looking at my config file I have line 81 configured like this $smb_cfg->cfgCachePath = '/tmp/moodle/'; This represents a potential security loophole, so make sure the permissions on the folder are set to read/right only with no execute permissions and that only apache (we're on Ubuntu so its www-data) can read and write to it. You will also need to setup a scheduled task to delete the files so the temporary area doesnt fill. Hope this helps you solve the problem. 1
mwnci Posted February 25, 2010 Author Posted February 25, 2010 Thanks for that fix - that works brilliantly! It's a shame that it is a bit of a security vulnerability, but hopefully this will be fixed properly further down the line with new releases of this module.
mwnci Posted February 25, 2010 Author Posted February 25, 2010 As an update to this - I can really only get this working when the apache user has execute rights. Is there anything I can do to avoid this?
Achandler Posted February 25, 2010 Posted February 25, 2010 I'm sure I haven't put execute rights in there i'll check when i get time.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now