Jump to content

Recommended Posts

Posted

We are running Moodle 1.9.8 on Windows Server 2008 R2 using a mysql db. We're having an issue where teachers upload images via the html text editor and it will upload fine, however the file doesn't get the permissions it should in order for other users to view it.

 

The permissions are correct on the parent directory, and the file itself says its inheriting, but it gets a completely different set of permissions until you either untick-re-tick inheritance, or tell the parent directory to reapply permissions to child files/folders...

 

If you create a file in the directory via notepad or whatever, it gets the permissions properly, so it seems to be something relating to moodle applying them when it creates?

Posted
None of the original file permissions match what it gets once its uploaded... and if you copy the same file from source to destination when logged in to the server, it gets the proper inherited permissions just fine...
Posted (edited)

What permissions does it have then, just default permissions such as SYSTEM and Administrators?

 

If so maybe the file is going to a temp area before being uploaded and it is from here that it is taking its permissions.

Edited by Achandler
Typos
  • Thanks 1
Posted

Just had a quick look, and it seems the perms on the temp folder match those that the file gets once its uploaded... when adding the correct perms to the temp folder it gets them on the destination as a work-around...

 

In the longer run, is there a way to fix it so the file gets the proper inheritance once it gets to the destination?

Posted

“...if the two folders were on separate drives, you wouldn’t have this problem...” (How to fix PHP upload file inherit permissions error using Windows IIS Server | HowYouDo.Info)

 

I’ve moved the temp directory (in PHP.ini) from D:\temp (D: drive is where moodledata directory is) to C:\PHP\Temp on the server, and file uploads are now correctly getting the permissions inheriting.

 

Thanks to both of you for pointing my troubleshooting in the right direction :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...