Folder Permissions the nth one
Hi!
Have installed Version 2.0.18.4 with FileUpload 1.5.2 also testet with 1.5.6(newest version compatible with 2.0) from GitHub.
My 'upload' folder is recursively set to 777. In the FileUpload Script new folders will be generated with 777 also. But when i upload a file with FileUpload plugin all folders/files were made with 664 and aren't readable.
When I set the permissions afterwards to 777 or 775 everything works okay.
Is that an issue in FileUpload plugin or a missconfiguration of my webserver? Tryed everything i can. File permissions on server seams to be okay. All owners and rights are right setted in my mind.
anyone else have this problem?
re-nitializing the plugin doesnt change anything.
thanks. this is an awesome part of software! nice and clean code!
Comments
okay. solved the problem by hacking a few lines into de script.
after creating the folders i changed permissions afterwards with chmod direct in the script:
and here:
to repair permissions on the file itself i did this:
Where abouts did you modify these? I'm guessing it was in the class.fileupload.plugin as I found the 1st and last ones to edit... But where abouts did you put the "if (!file_exists...." bit???
I'm on my final straw with this plugin and this forum software.
Failure to understand permission properly (including some web hosts, and developers), is reason why people set to 0777 (which is almost never necessary).
One reason why the folders might not being set under the right permission, is the folder are not owned by the php web user. Typically the web user is www-data. However the permission strategy depend on the gateway interface (e.g. cgi, fastCGI, DSO,suPHP)
You can create a file called test.php an point it.
see who the user is (often www-data)
Then set accordingly.
e.g.
Instead of blaming everyone else, stop the hissy fit for a second, an consider it is you own fault.
It is a flawed strategy to set permission in php from a development scenario, becuase in many cases you don't have sufficient permission to do so, in fact is is better if the web user can't just set any permissions.
grep is your friend.