+ Post New Thread
Results 1 to 2 of 2
Virtual Learning Platforms Thread, moodle smb block in Technical; Hi, could anyone please tell me how to block certain file types using the smb block. What's stopping the students ...
  1. #1

    Join Date
    Feb 2008
    Posts
    325
    Thank Post
    51
    Thanked 3 Times in 3 Posts
    Rep Power
    14

    moodle smb block

    Hi, could anyone please tell me how to block certain file types using the smb block. What's stopping the students uploading anything to this? What is the securoty like for this block?

    Thanks

  2. #2
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    889
    Thank Post
    84
    Thanked 234 Times in 193 Posts
    Rep Power
    82
    Security is defined by permissions set on the shares on your windows servers. If a student doesn't have access to a share over the regular network, then they don't have access to a share over the SMB client. If you have ClamAV installed on your moodle host server, then it'll run uploads thru that also.

    Line 2383 of class_smbwebclient.php is where the upload function begins.

    Code:
    function UploadFile ($file)
    
    {
    
    	$this->_SmbClient('put "'.$file.'" "'.$this->name.'"', $this->parent);
    
    }

    You could expand on this easily enough via various relatively basic (depends on your php knowledge ultimately) methods to restrict filetype...

    Code:
    function UploadFile ($file)
    
    {
                 $allowable_ext = array('avi','mpg','mov','3gp','3GP','wmv');
                 $pieces = explode('.', $file);
                 $ext = $pieces[count($pieces) - 1];
                 if  (in_array($ext, $allowable_ext))
    	    { $this->_SmbClient('put "'.$file.'" "'.$this->name.'"', $this->parent); }
    
    }

    Or (better and more secure, as it won't be long til they work out to just rename the file) you could go by mimetype...

SHARE:
+ Post New Thread

Similar Threads

  1. Windows smb moodle block
    By itgeek in forum Virtual Learning Platforms
    Replies: 10
    Last Post: 15th February 2011, 09:30 AM
  2. smb client moodle
    By itgeek in forum Virtual Learning Platforms
    Replies: 1
    Last Post: 15th October 2010, 10:06 PM
  3. Moodle SMB Web Client
    By Hightower in forum Virtual Learning Platforms
    Replies: 15
    Last Post: 21st July 2010, 10:55 AM
  4. Moodle: SMB Web Client Issues
    By tdibb in forum Virtual Learning Platforms
    Replies: 10
    Last Post: 29th July 2009, 12:19 PM
  5. Moodle: SMB Web Client - HTTPS...
    By fabled-aesop in forum Virtual Learning Platforms
    Replies: 14
    Last Post: 17th March 2009, 04:27 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •