OutLawTorn Posted November 26, 2010 Posted November 26, 2010 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?
Achandler Posted November 26, 2010 Posted November 26, 2010 Is it keeping the permissions the file had originally before being uploaded?
OutLawTorn Posted November 27, 2010 Author Posted November 27, 2010 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...
Achandler Posted November 29, 2010 Posted November 29, 2010 (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 November 29, 2010 by Achandler Typos 1
frosty Posted November 29, 2010 Posted November 29, 2010 I had something simliar like this before. It turned out to be as Achandler said permissions on the tmp folder. 1
OutLawTorn Posted November 29, 2010 Author Posted November 29, 2010 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?
OutLawTorn Posted December 1, 2010 Author Posted December 1, 2010 “...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
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